ios - How to constrain uicollectionviewflowlayout to a specified frame -


i'm new uicollectionview. though i've watched wwdc talks on i'm still unclear how achieve layout. i'm trying constrain flow layout square bottom aligned window's rootviewcontroller (see image). however, when setting uiedgeinsetsmake(200, 10, 10, 10) understand should compress top portion of flow layout, instead happens flow layout compressed top , bottom. additionally, i'm not sure how use -(nsarray *)layoutattributesforelementsinrect:(cgrect)rect or -(cgsize)collectionviewcontentsize create layout.

-(id)init {     self = [super init];     if (self) {         self.scrolldirection = uicollectionviewscrolldirectionhorizontal;         self.itemsize = cgsizemake(75, 75);         self.sectioninset = uiedgeinsetsmake(100, 10, 10, 10);     }     return self; } 

what results are: enter image description here

what i'm trying acheive: enter image description here

i think frame of collection view different need .set properly


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -