Multiple views in Xcode storyboard view controller, one of them won't appear in storyboard editor

╄→尐↘猪︶ㄣ 提交于 2019-11-30 11:32:09

I know it makes no sense, but you can drag it into the first view (temporarily) to edit it via the storyboard. I think this is absurd, but it does work.

I had this issue some times ago, and the only method I found to work graphically on the hidden view was to:

  • add another temporary ViewController to the Storyboard
  • assign the correct class to it (MainViewController, in your case)
  • delete it's main view (left menù, command + backspace)
  • select the hidden view from the original ViewController and drag it in the new one, exactly under the "Main View Controller" icon (always using the left menù, the one you attached in the image)
  • work on the view, add control and graphics, even connecting outlet / actions
  • when finished working on the view, drag the view back to it's original position
  • delete the temporary view controller

The outlet should stay connected. If you use command-x / command-v (cut/paste) you lose the outlets.

Let me know

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