Bladeren bron

界面初始化

jsonwang 4 jaren geleden
bovenliggende
commit
f0506fb7f5
1 gewijzigde bestanden met toevoegingen van 11 en 4 verwijderingen
  1. 11 4
      MusicVideoPlus/MusicVideoPlus/AppDelegate.swift

+ 11 - 4
MusicVideoPlus/MusicVideoPlus/AppDelegate.swift

@@ -14,10 +14,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
     var window: UIWindow?
 
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
-            window = UIWindow()
-              window?.makeKeyAndVisible()
-              window?.rootViewController = ViewController()
-              return true
+       
+        window = UIWindow(frame: UIScreen.main.bounds)
+
+        let rootViewController = ViewController()
+        let navigationController = UINavigationController(rootViewController: rootViewController)
+
+        window?.rootViewController = navigationController
+
+        window?.makeKeyAndVisible()
+        return true
+ 
     }