Reusable UICollectionViewCell and UICollectionReusableView
UICollectionView at its core
Easy extendable
Requirements
iOS 10.0+
Xcode 9.0+
Swift 5.0+
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.1+ is required to build ItemsDataSource.
To integrate ItemsDataSource into your Xcode project using CocoaPods, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'ItemsDataSource'
end
if you’re using CocoaPods 1.5.0+ you can include ItemsDataSource as static library:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target '<Your Target Name>' do
pod 'ItemsDataSource'
end
Then, run the following command:
$ pod install
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate ItemsDataSource into your Xcode project using Carthage, specify it in your Cartfile:
github "ItemsDataSource"
Run carthage update to build the framework and drag the built ItemsDataSource.framework into your Xcode project.
Manually
If you prefer not to use any of the aforementioned dependency managers, you can integrate ItemsDataSource into your project manually.
Just copy files from Sources folder to your projects:
ItemsDataSource
ItemsDataSource is a generic datasource for UICollectionView.
Features
Requirements
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
To integrate ItemsDataSource into your Xcode project using CocoaPods, specify it in your
Podfile
:if you’re using
CocoaPods 1.5.0+
you can includeItemsDataSource
as static library:Then, run the following command:
Carthage
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
To integrate ItemsDataSource into your Xcode project using Carthage, specify it in your
Cartfile
:Run
carthage update
to build the framework and drag the builtItemsDataSource.framework
into your Xcode project.Manually
If you prefer not to use any of the aforementioned dependency managers, you can integrate ItemsDataSource into your project manually. Just copy files from
Sources
folder to your projects:Usage
Define your model as usual
Conform your model to
Itemable
Add
configure
method to model in extensionIn ViewController inject your datasource
For more details, please check an iOS example or ask me on twitter: @minikin
Support
Post issues and feature requests on the GitHub issue tracker.
License
ItemsDataSource is released under the MIT license. See LICENSE for details.