Do we need to use 2 Storyboard for a Universal app?

前端 未结 6 1737
星月不相逢
星月不相逢 2021-02-06 12:01

I have a project for iPhone and iPad. The iPad needs a split view controller. Do we create two separate storyboards? One for iPhone (using autolayout we can support all devices)

6条回答
  •  粉色の甜心
    2021-02-06 13:02

    You can have many more than just two storyboards. If you are unable to us size classes / auto layout to accomplish the job of a view controller shared between iPhone and iPad, you can split that part into separate storyboards. You can then create a third storyboard which holds the view controllers that are shared. You can then instantiate that storyboard in code and use it to instantiate its view controllers.

提交回复
热议问题