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:
what i'm trying acheive:
i think frame of collection view different need .set properly
Comments
Post a Comment