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 uilabel subview; add leading constraint superview: 0; add constraint center vertically inside superview
  • add uiswitch subview; add trailing constraint superview: 0; add horizontal distance constraint uilabel: 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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -