2017-02-24 91 views
1

我在Xcode的應用程序,我想開始沒有故事板,所以我創建了AppDelegate的一個新窗口:的AppDelegate窗口初始化沒有正確的尺寸

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 

    let InitialViewController: SignViewController = SignViewController() 
    let NavigationController: UINavigationController = UINavigationController(rootViewController: InitialViewController) 

    self.window = UIWindow(frame: UIScreen.main.bounds) 
    self.window!.rootViewController = NavigationController 
    self.window!.makeKeyAndVisible() 

    return true 

} 

這樣做的問題是,如果我模擬它返回一個奇怪的看着屏幕,這似乎是小y軸上的,我不知道爲什麼:

enter image description here

誰能告訴我什麼,我需要改變嗎?

回答

0

我提出了和你一樣的問題。檢查你的info.plist。您是否刪除了「啓動屏幕界面文件基本名稱」?如果你這樣做了,把它加回來,問題就解決了。

+0

是的,這是什麼,謝謝 – Luis