Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Collection View Question

I have a collection view which has a 8:10 aspect ratio and I want to add 80 collection view cells each with a 1:1 ration. I have tried just changing the number of cell to 80 in the collection view attributes and they show up on the story board but are not visible when I run the app. What would be the best way to add 80 cells to my collection view? note: the number of cells will not change.

1 Answer

Make sure you are implementing the collection view data source methods so that 80 cells appear in your collection view.

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionViewDataSource_protocol/index.html#//apple_ref/occ/intf/UICollectionViewDataSource