Add IBOutlet to Collection View classes
Closed this issue · 2 comments
Please add IBOutlet to the following properties in order to use and design instances of the classes in interface builder:
- SSCollectionView: dataSource, delegate
- SSCollectionViewController: collectionView
As I've been using SSCollectionView in a project, and using it with IB, I actually just made this simple change in my fork. However I'd inadvertently done a previous pull request on my "master" branch and can't work out a clean way to re-organise it and have 2 pull requests without a lot of messing around (sorry, relatively new to git). Anyway, it's only 3 lines, pretty trivial!
I did the changes locally, but now there is another problem. In my xib file, I have a SSCollectionViewController object. The view of the controller has a SSCollectionView as subview. In IB I set the dataSource and the delegate of the SSCollectionView to the SSCollectionViewController object. When I start the application, an exception occurs in [SSCollectionView _itemSizeForSection] because _delegate is nil. Any hints?
The structure in IB looks like:
SSCollectionViewController
|
- UIView
|
+-- UIToolbar
|
+- SSCollectionView