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

后端 未结 2 804
余生分开走
余生分开走 2021-01-01 21:06

I\'m having trouble updating a project someone else created in Xcode. This is an app built in storyboard and in one case, there is a scene with a view controller that has mu

相关标签:
2条回答
  • 2021-01-01 21:43

    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

    0 讨论(0)
  • 2021-01-01 21:52

    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.

    enter image description here

    0 讨论(0)
提交回复
热议问题