I want to use this excellent UICollectionView
layout: https://github.com/bryceredd/RFQuiltLayout
As expected, it wants me to set my Collection View's layout class to it. This can't be done, because Xcode does not accept RFQuiltLayout
in the class field (beeps, and clears the field if I select anything else).
I tried this with a new, empty project too.
What did I wrong?
(Tried in both Xcode 4.2.1/iOS 6 and Xcode 5/iOS 7, OS X Mavericks.)
To create a UICollectionView programmatically, I will create a new instance of UICollectionView by giving it a UICollectionViewFlowLayout as a parameter. The above collection view will not display any items however.
For the listing details of each item, people use UITableView because it shows more info on each item. The UICollectionView class manages an ordered collection of data items and presents them using customizable layouts.
An abstract base class for generating layout information for a collection view.
You are probably trying to set it in the Class field of the Identity Inspector, which is for the UICollectionView's class or subclass.
Instead, open the CollectionView's Attributes Inspector, select Layout > Custom
and below Class > RFQuiltLayout
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With