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 trialChristopher haro
Courses Plus Student 3,372 PointsOn 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
42,016 Pointsthe 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
Christopher haro
Courses Plus Student 3,372 Pointsthank you and i will start asking better questions in more of a profession manner.
Stone Preston
42,016 Pointsoh 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
Christopher haro
Courses Plus Student 3,372 Pointsits working, thank you very much i been working on this for a couple hours this morning.
Stone Preston
42,016 Pointslike 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
Christopher haro
Courses Plus Student 3,372 PointsChristopher haro
Courses Plus Student 3,372 Pointslayout itemsize - CGSizeMake (100.0,100.0 ) or (100,100) would not work.
Stone Preston
42,016 PointsStone Preston
42,016 Pointslayout.itemSize = CGSizeMake(100, 100);
should work just fine