TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jul 2016 |
SPMSupports SPM | ✗ |
Maintained by Suyeol Jeon.
Generic reusables for Cocoa. Currently supports UITableView
and UICollectionView
.
struct Reusable {
static let headerView = GenericCell<SectionHeaderView>()
static let userCell = GenericCell<UserCell>()
}
tableView.registerView(Reusable.headerView)
tableView.registerCell(Reusable.userCell)
tableView.dequeueView(Reusable.userCell)
tableView.dequeueCell(Reusable.userCell)
struct Reusable {
static let headerView = GenericCell<SectionHeaderView>()
static let photoCell = GenericCell<PhotoCell>()
}
collection.registerView(Reusable.headerView, kind: .Header)
collection.registerCell(Reusable.photoCell)
collection.dequeueView(Reusable.headerView, kind: .Header)
collection.dequeueCell(Reusable.photoCell, forIndexPath: indexPath)
Pull requests are welcomed
For iOS 8+ projects with CocoaPods:
pod 'GenericReusable', '~> 0.2.0'
For iOS 8+ projects with Carthage:
github "devxoul/GenericReusable" ~> 0.2.0
For iOS 7 projects with CocoaSeeds:
github 'devxoul/GenericReusable', '0.2.0', :files => 'Sources/*.swift'
GenericReusable is under MIT license. See the LICENSE file for more info.