How to create storyboard layout multiple views within header view iOS?

点点圈 提交于 2020-01-11 12:34:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!