Is it possible to have 2 view controllers from 2 different storyboards to be active on the screen simultaneously?

流过昼夜 提交于 2019-12-25 01:44:47

问题


I am trying to develop something on the lines of the Uber app. I have to keep the 2 view controllers in separate storyboards. I need to pull up a drawer like in Uber over a View controller which has a scnview. In simpler term and taking Uber as an example, I need a way to accomplish the same interaction where the mapViewController is in one storyboard and the drawer having the driver details to be in another storyboard.


回答1:


You can implement this feature in many other ways as well,

But answer to your question is - Yes you can display more than one controller at the same time on screen.

You can use ContainerView like this :

And using Storyboard reference, you can contain UIViewController of another storyboard's controller.




回答2:


Yes you using containerView you can do this.

Step 1: Set up a Reference of storyboard

Step 2: Select Embed at above Picture

Step 3: this is your second storyboard with entry point

Step 4: This is your output



来源:https://stackoverflow.com/questions/53076636/is-it-possible-to-have-2-view-controllers-from-2-different-storyboards-to-be-act

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