ios - Adding subview to superview shared by a container view resizes container view -
i have view controller view has container view subview. set initial frame of container view in ib , later change according if iad loaded in banner. if add subview view controller's view container view's frame gets resized frame set in ib.
i have no idea why happening , appreciate help. created test app eliminate of other variables know situation.
when you're using auto layout, can't set frames of views load xib or storyboard. auto layout sets frames, , ignores changes make frames. need update constraints on views if need move or resize them directly.
you can create outlet pointing nslayoutconstraint
in view controller, , connect outlet appropriate constraint in xib or storyboard. can change constraint's constant
property change view's position or height.
Comments
Post a Comment