AZCollectionViewController alternatives and similar libraries
Based on the "UICollectionView" category.
Alternatively, view AZCollectionViewController alternatives based on common mentions on social networks and blogs.
-
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
Gliding Collection
:octocat: Gliding Collection is a smooth, flowing, customizable decision for a UICollectionView Swift Controller. iOS library made by @Ramotion -
CenteredCollectionView
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift -
Card Slider
:octocat: 🃏 Cardslider is a design UI controller that allows you to swipe through cards with pictures and accompanying descriptions. -
RAReorderableLayout
DISCONTINUED. A UICollectionView layout which can move an item with drag and drop. -
GravitySlider
🔄 GravitySlider is a beautiful alternative to the standard UICollectionView flow layout. -
Blueprints
DISCONTINUED. :cyclone: Blueprints - A framework that is meant to make your life easier when working with collection view flow layouts. -
ReplaceAnimation
Pull-to-refresh animation in UICollectionView with a sticky header flow layout, written in Swift :large_orange_diamond: -
CarLensCollectionViewLayout
DISCONTINUED. An easy-to-use Collection View Layout for card-like animation. -
CollectionViewShelfLayout
A UICollectionViewLayout subclass displays its items as rows of items similar to the App Store Feature tab without a nested UITableView/UICollectionView hack. -
CheckmarkCollectionViewCell
UICollectionViewCell with checkbox when it isSelected and empty circle when not - like Photos.app "Select" mode. -
FlexibleRowHeightGridLayout
A UICollectionView grid layout designed to support Dynamic Type by allowing the height of each row to size to fit content. -
CustomCollectionLayout
This is an example project for my article called "UICollectionView Tutorial: Changing presentation on the fly" -
GoodProvider
🚀UITableView and UICollectionView provider to simplify basic scenarios of showing the data.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of AZCollectionViewController or a related project?
README
AZCollectionView Controller
Features
- Automatic pagination handling
- No more awkward empty CollectionView screen
- AZ CollectionVIew controller give you advantage to connect your (Loading, no result, error ) views via Interface builder
- You can also add your custom xib as dummy views (loading, error, no result)
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate AZ CollectionVIew controller 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 'AZCollectionViewController'
end
Then, run the following command:
$ pod install
Usage
Step 1
- Extend your view controller from AZCollectionViewController ```swift
class ViewController: AZCollectionViewController {
var lastIndex = 0
var results = [String]()
override func viewDidLoad() {
nextLoadingCellNibName = "LoadingCollectionViewCell"
nextLoadingCellIdentifier = "LoadingCollectionViewCell"
loadNextPageLoaderCell(nibName: nextLoadingCellNibName, cellIdentifier: nextLoadingCellIdentifier) // Only if you want personal NextPage loading cell
super.viewDidLoad()
self.fetchData()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
#### Step 2
* Same as AZTableVIewController
* Set the loading views outlet as given below
* Connect collectionView outlet as well
![Alt text](http://i.imgur.com/SWYNa2W.png "AZTableView-step2")
![Alt text](http://i.imgur.com/Zi9RKJ2.png "AZTableView-step2")
* To load views from custom .xib files
```swift
class ViewController: AZCollectionViewController {
override func viewDidLoad() {
self.loadLoadingView(nibName: "your nib name") // if bundle is nil
self.loadErrorView(nibName: "your nib name", bundle: yourBundle) // if custom bundle
super.viewDidLoad()
self.fetchData()
}
}
- If your xibs are in main bundle than use
swift self.loadLoadingView(nibName: "your nib name") // if bundle is nil
Else useswift self.loadLoadingView(nibName: "your nib name", bundle: yourBundle)
Step 3
- And override AZCollectionView cellForRow function.
extension ViewController {
override func AZCollectionView(_ collectionView: UICollectionView, cellForRowAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! TestCollectionViewCell
cell.feedImage.image = UIImage(named: self.results[indexPath.row])
return cell
}
override func AZCollectionView(_ collectionView: UICollectionView, heightForRowAt indexPath: IndexPath) -> CGSize {
return CGSize(width: (collectionView.frame.size.width / 3) - 6, height: (collectionView.frame.size.width / 3) - 4)
}
}
Step 4
- Override two more functions "fetchData" and "fetchNextData"
//MARK: - API Call
extension ViewController {
override func fetchData() {
super.fetchData()
FakeService.getData { (error, results) in
if let resu = results {
self.results.removeAll()
self.results.append(contentsOf: resu)
self.didfetchData(resultCount: resu.count, haveMoreData: true)
}
else if let error = error {
self.errorDidOccured(error: error)
}
}
}
override func fetchNextData() {
super.fetchNextData()
FakeService.getData (offset: results.count) { (error, results) in
if let resu = results {
self.results.append(contentsOf: resu)
if self.results.count < 45 { // you probably get next page exist from service.
self.didfetchData(resultCount: resu.count, haveMoreData: true)
}
else {
self.didfetchData(resultCount: resu.count, haveMoreData: false)
}
}
else if let error = error {
self.errorDidOccured(error: error)
}
}
}
}
Done
Thats it, you successfully integrate AZCollectionViewController
License
AZCollectionViewController is available under the MIT license. See the LICENSE file for more info.
Author
Afroz Zaheer - (https://github.com/AfrozZaheer)
*Note that all licence references and agreements mentioned in the AZCollectionViewController README section above
are relevant to that project's source code only.