user2365995
user2365995

Reputation: 87

UICollectionVIew without using the storyboard?

I read through these tutorials on UICollectionView:

http://blogs.captechconsulting.com/blog/paul-dakessian/ios-6-tutorial-getting-started-collection-views

http://invasivecode.tumblr.com/post/34581461219/an-introduction-to-collection-views.

I know it's easy to use the CollectionView in storyboard, but I want to use the UICollectionView with a xib instead of a storyboard.

Thanks in advance.

Upvotes: 7

Views: 9464

Answers (2)

Priyank Gandhi
Priyank Gandhi

Reputation: 1253

This is another stackoverflow link :

UICollectionView adding UICollectionCell

This is one Github project:

https://github.com/lequysang/TestCollectionViewWithXIB

Upvotes: 11

Michael Dautermann
Michael Dautermann

Reputation: 89509

A XIB file usually contains exactly one view controller (and many objects as part of that view controller).

And a storyboard is (for all intents and purposes) essentially a collection of XIB files all strung together by segues, so you can follow the flow.

What you really want to do here is simply substitute the word "XIB" for the word "Storyboard" in pretty much any tutorial you're looking at, keeping in mind that without a storyboard, you won't be using segues to get from view controller to the next view controller.

And here's a UICollectionView tutorial that you can refer to, which happens to talk about xib files, to boot. I hope this info helps you out!

Upvotes: 5

Related Questions