How to create storyboard layout multiple views wit

2019-03-02 04:45发布

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.

enter image description here

2条回答
看我几分像从前
2楼-- · 2019-03-02 05:31

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 :

enter image description here

Hope this can help

查看更多
Rolldiameter
3楼-- · 2019-03-02 05:48

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..

查看更多
登录 后发表回答