ios - Can't set size of UIButton frame with auto layout enabled -
i tried hard solve apparently simple problem myself, couldn't fix yet!
so here's deal:
i using storyboard auto layout enabled. because of many objects in 1 of views, decided implement the
- (void)willanimaterotationtointerfaceorientation:(uiinterfaceorientation)interfaceorientation duration:(nstimeinterval)duration
method view controller , set frames views explicit so:
self.startstopbtn.frame = cgrectmake(10, 223.5, 300, 30);
and works fine long keep size of uibutton
object same (as in storyboard) , change origin. change size button gone!
finally enough can change frames of labels, views , image views without problems in same method in exact same way.
i appreciate help! can guide me in right direction.
if using autolayout should not manimulate uiview
frame. should modify nslayoutconstaints
change in view code.
Comments
Post a Comment