iOS 7 - Failing to instantiate default view controller

前端 未结 16 2022
一生所求
一生所求 2020-11-28 03:08

I am using Xcode 5 in a newly created app and when I just create it I go for the run button e click on it, then the project gets built but it does not show in the iOS Simula

16条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 03:27

    This warning is also reported if you have some code like:

        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window?.rootViewController = myAwesomeRootViewController
        window?.makeKeyAndVisible()
    

    In this case, go to the first page of target settings and set Main Interface to empty, since you don't need a storyboard entry for your app.

提交回复
热议问题