ios - Constrain UIView in Xcode Interface Builder such that it is as large as "union" of its subviews -
i add subview inside storyboard follows: should contain uilabel , uiswitch , should large enough such 2 controls fit inside constant horizontal distance in between them.
to end following in xcode 5.1.1's interface builder:
- add view
- add
uilabelsubview; add leading constraint superview: 0; add constraint center vertically inside superview - add
uiswitchsubview; add trailing constraint superview: 0; add horizontal distance constraintuilabel: 40; add constraint center vertically inside superview
when ask ib update frames, view receives layout height zero. how can add constraints in ib (not programmatically) ensure view large "union" of 2 subviews?
Comments
Post a Comment