Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Build a Photo Browser iPhone App Collection Views Customizing a UICollectionViewFlowLayout

On the first challenge in C on mac ; its asking to add size, i dont understand?

i tryed (CGSize)collectionView UICollectionView UICollectionViewLayout NSIndexPath

i even watched the video and did what the video did , but do i need to make a interface , and implemetation first? im not sure how make it work,

3 Answers

Stone Preston
Stone Preston
42,016 Points

the challenge is a bit confusing and poorly worded, what its really asking is for you to modify the itemSize property of your layout variable which can be done like so:

layout.itemSize = CGSizeMake(x, y);

where x and y are the width and height you want to set the size to.

I noticed you dont have many iOS points. This is an advanced project that requires a good understanding of objective c and iOS development. You should probably start with this deep dive instead

layout itemsize - CGSizeMake (100.0,100.0 ) or (100,100) would not work.

Stone Preston
Stone Preston
42,016 Points

layout.itemSize = CGSizeMake(100, 100); should work just fine

thank you and i will start asking better questions in more of a profession manner.

Stone Preston
Stone Preston
42,016 Points

oh no your question was fine. The challenge's question is the one thats confusing, not your post : ). Sorry, ive edited my answer to say the challenge is confusing, not the question. The challenge asks you to change the size, but what its really wanting you to change is the itemSize

its working, thank you very much i been working on this for a couple hours this morning.

Stone Preston
Stone Preston
42,016 Points

like I said, if you are having a lot of difficulty with this and have no prior iOS experience I would recommend doing this deep dive first