What is the difference between “Multiple” and “Single” for View Controller Presentation?

女生的网名这么多〃 提交于 2021-02-07 11:23:07

问题


I've been working on an OS X app in Xcode. An option that completely perplexes me is "Presentation", with the two options "Single" and "Multiple" what does this attribute do?

enter image description here


回答1:


So, this was actually "obvious" once I used it.

Basically, this feature causes a window to be displayed once, or multiple times if the corresponding segue in a storyboard has been triggered multiple times.

To see this in action, add a create a storyboard with a view controller in it. The place a button on the view, and an additional window controller. Create a segue between the button and the window controller to "show" the window controller.

Click on the window controller and toggle between the two Presentation options. When you run it, you will find that one case will create multiple instances of the window, while the other will create a single instance of the window.

Like I said, obvious, but had to actually use it to figure it out.



来源:https://stackoverflow.com/questions/30563367/what-is-the-difference-between-multiple-and-single-for-view-controller-prese

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