问题
I have created header UIView
on storyboard
view controller, now I need to create 4 views like below colored image Into that UIview
base view. It should show for all devices. Need to adjust auto layout using iOS
.
回答1:
First set constraints to header view. Select header view and apply following constraints:
- Leading, top, trailing space and Height = 80 (for example)
Once you apply constraints to header view then select all buttons at once :
Hope this can help
回答2:
Try this..
Now IOS 9 realse new feature stackview
.
U can drag the stackview
into your header view and add uiviews
into it.
You can also change stackview
's properties based on your project..
来源:https://stackoverflow.com/questions/34368025/how-to-create-storyboard-layout-multiple-views-within-header-view-ios