Parcourir la source

界面初始化

jsonwang il y a 4 ans
Parent
commit
f0506fb7f5
1 fichiers modifiés avec 11 ajouts et 4 suppressions
  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
+ 
     }