i need update nslayoutconstraints before view comes on screen depending on device's screen size.
what want update becomes invisible user's eyes. , not know can because : - if in :
- (void)viewwilllayoutsubviews
of uiviewcontroller called twice make twice calculation on constraint , not want set bool or counter... - if in :
- (void)viewdidload
it not work because calculate constrain's value based on view of view controller 0 height @ moment.
i see there lot of methods auto layout (setneedsupdate ...) , if tell me best way achieve update of constraints once in viewcontroller lifecycle great.
thanks help! (n.b: auto-layout concept new me.)
try overriding updateviewconstraints on view controller. (don't forget call super ;) )
Comments
Post a Comment