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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -