iOS 8 - Swift - Xcode 6 Beta - working without interface builder (no nibs and no storyboard)

后端 未结 2 1897
你的背包
你的背包 2021-01-14 05:19

I have been searching a lot in the inter webs and Stackoverflow. Unfortunately there doesn\'t seem to be much info around the new Xcode version, iOS 8 specifically with Swif

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

    The method outlined by codester is a good solution, but (in Xcode 6.0.1) the final step - deleting "Main" from the Main Interface section - would not work for me; I would delete the string, but as soon as I navigated away from that page or tried to run the app, the field would be repopulated with "Main". I ended up having to manually delete the "UIMainStoryboardFile" key/value entry in the applications Info.plist.

    0 讨论(0)
  • 2021-01-14 05:49

    In my opinion storyBoards are awesome. They make the development cycle easy and quick. But if you do not want them you can create a Single View Application template.

    Delete the storyBoard and Follow these steps

    1) Go to Your Target

    2) Deployment Info

    3) Main Interface -> Delete Main and keep field empty

    enter image description here

    It will not load a storyboard or any view. Now it's your responsibility to load Window and create rootViewControllers and views programmatically

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