Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

* Update the README with up-to-date Swift versions and Installation Instructions.
[@kuyazee](https://github.com/kuyazee)
[@AliSoftware](https://github.com/AliSoftware)
[#95](https://github.com/AliSoftware/Reusable/pull/95)

* Set `APPLICATION_EXTENSION_API_ONLY` build setting on built frameworks.
[@AliSoftware](https://github.com/AliSoftware)
[#98](https://github.com/AliSoftware/Reusable/pull/98)
Expand Down
59 changes: 57 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,72 @@ A Swift mixin to use `UITableViewCells`, `UICollectionViewCells` and `UIViewCont
[![CircleCI](https://circleci.com/gh/AliSoftware/Reusable/tree/master.svg?style=svg)](https://circleci.com/gh/AliSoftware/Reusable/tree/master)
[![Platform](http://cocoapod-badges.herokuapp.com/p/Reusable/badge.png)](http://cocoadocs.org/docsets/Reusable)
[![Version](http://cocoapod-badges.herokuapp.com/v/Reusable/badge.png)](http://cocoadocs.org/docsets/Reusable)
[![Language: Swift 3 & 4](https://img.shields.io/badge/Swift-3%20%26%204-orange.svg)](https://swift.org)
[![Language: Swift 3](https://img.shields.io/badge/Swift-3-orange)](https://swift.org)
[![Language: Swift 4](https://img.shields.io/badge/Swift-4-orange)](https://swift.org)
[![Language: Swift 5](https://img.shields.io/badge/Swift-5-orange)](https://swift.org)

# Requirements
# Installation

<details><summary><b>Requirements</b>: which Reusable version to use for each Swift Version?</summary>

| Swift Version | Reusable Version |
|----------------|--------------------|
| 2.2 & 2.3 | 2.5.1 |
| 3.0 (†) | 3.0.0 + |
| 4.0 | 4.0.2 + |
| 5.0 | 4.1.0 + |

_(†) The Reusable 3.0 code also compiles with Swift 4, you'll need 4.0.2+ only if you're using Carthage for integration_

</details>

Reusable can be integrated to your Xcode projects using one of the following options:

<details><summary>Installation instructions for <b>Swift Package Manager (SPM)</b></summary>

[Swift Package Manager](https://swift.org/package-manager/) is Apple's decentralized dependency manager to integrate libraries to your Swift projects. It is now fully integrated with Xcode 11

To integrate Reusable into your project using SPM, specify it in your `Package.swift` file:

```swift
let package = Package(
dependencies: [
.package(url: "https://github.com/AliSoftware/Reusable.git", from: "4.1.0"),
],
targets: [
.target(name: "YourTarget", dependencies: ["Reusable", …])
]
)
```
Copy link
Owner

@AliSoftware AliSoftware Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MortyMerr can you validate that the example is right? (Never actually integrated Reusable on another project via SPM, so another look from someone who already did could be nice)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't try it directly with Reusable, but I confirm that the syntax used in the example is right.


</details>

<details><summary>Installation instructions for <b>Carthage</b></summary>

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager to add pre-built frameworks to your Cocoa application.

To integrate Reusable into your Xcode project using Carthage, specify it in your `Cartfile`:

```bash
github "AliSoftware/Reusable"
```

</details>

<details><summary>Installation instructions for <b>CocoaPods</b></summary>

[CocoaPods](https://cocoapods.org/) is a dependency manager to automate integration of frameworks to your Swift and Objective-C Cocoa projects.

To integrate Reusable into your Xcode project using Cocoapods, specify it in your `Podspec`:

```bash
pod 'Reusable'
```

</details>

# Introduction

This library aims to make it super-easy to create, dequeue and instantiate reusable views anywhere this pattern is used: from the obvious `UITableViewCell` and `UICollectionViewCell` to custom `UIViews`, even supporting `UIViewControllers` from Storyboards.
Expand Down Expand Up @@ -459,6 +513,7 @@ The concepts behind Reusable has been presented in various articles and talks:
* [Using Generics to improve TableView cells](https://alisoftware.github.io/swift/generics/2016/01/06/generic-tableviewcells/) on my blog
* [FrenchKit'16 talk: Mixins over Inheritance](https://youtu.be/BSn4jlunn4I) (video)
* Same talk was also given at NSSpain'16 ([slides](https://speakerdeck.com/alisoftware/mixins-over-inheritance)) and AppDevCon'17 ([slides](https://speakerdeck.com/alisoftware/mixins-over-inheritance-appdevcon-17))
* [No more String-typed instantiations on iOS Development](https://medium.com/@zonilyjame/reusable-no-more-string-typed-instantiations-on-ios-development-aa1a4f59201c)

# License

Expand Down