質問編集履歴

1

AppDelegate.swiftの追加

2019/10/03 02:19

投稿

lady-navigation
lady-navigation

スコア11

test CHANGED
File without changes
test CHANGED
@@ -312,6 +312,84 @@
312
312
 
313
313
 
314
314
 
315
+ // AppDelegate.swift
316
+
317
+
318
+
319
+ import UIKit
320
+
321
+
322
+
323
+ @UIApplicationMain
324
+
325
+ class AppDelegate: UIResponder, UIApplicationDelegate {
326
+
327
+ var window: UIWindow?
328
+
329
+
330
+
331
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
332
+
333
+ // Override point for customization after application launch.
334
+
335
+ if #available(iOS 13, *){
336
+
337
+ }else{
338
+
339
+ let myFirstViewController: ViewController = ViewController()
340
+
341
+ let vc = UINavigationController(rootViewController: myFirstViewController)
342
+
343
+ self.window = UIWindow(frame:UIScreen.main.bounds)
344
+
345
+ self.window?.rootViewController = vc
346
+
347
+ self.window?.makeKeyAndVisible()
348
+
349
+ }
350
+
351
+ return true
352
+
353
+ }
354
+
355
+
356
+
357
+ // MARK: UISceneSession Lifecycle
358
+
359
+ @available(iOS 13.0, *)
360
+
361
+ func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
362
+
363
+ // Called when a new scene session is being created.
364
+
365
+ // Use this method to select a configuration to create the new scene with.
366
+
367
+ return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
368
+
369
+ }
370
+
371
+
372
+
373
+ func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
374
+
375
+ // Called when the user discards a scene session.
376
+
377
+ // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
378
+
379
+ // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
380
+
381
+ }
382
+
383
+
384
+
385
+
386
+
387
+ }
388
+
389
+
390
+
391
+
392
+
315
393
 
316
394
 
317
395