iphone - Can I set frame for UIView when use Adaptive Layout -
i trying use setframe
uiview, use auto layout on it. trouble can setframe uiview, in spite of use setframe(x, y, w, h)
it. realise because of adaptive layout deny it, can setframe first @ runtime before adaptive layout adapt? thank you
if trying use adaptive layout auto layout should not think in terms of frames.
however, edge cases, auto layout engine allows "fine tuning" after has calculated position of elements. in uiview
code set layout constraints
- (void)updateconstraints { [self applymyviewconstraints]; [super updateconstraints]; }
after system updates constraints, call layoutsubviews
in uiview. @ stage frames related items set , final. can overwrite auto layout frames desire.
- (void)layoutsubviews { [super layoutsubviews]; self.myview.frame = cgrectmake(0, 0, 10, 200); }
Comments
Post a Comment