質問編集履歴
1
AppDelegate.swiftの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -155,9 +155,48 @@
|
|
155
155
|
}
|
156
156
|
|
157
157
|
|
158
|
+
// AppDelegate.swift
|
158
159
|
|
160
|
+
import UIKit
|
159
161
|
|
162
|
+
@UIApplicationMain
|
163
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
164
|
+
var window: UIWindow?
|
160
165
|
|
166
|
+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
167
|
+
// Override point for customization after application launch.
|
168
|
+
if #available(iOS 13, *){
|
169
|
+
}else{
|
170
|
+
let myFirstViewController: ViewController = ViewController()
|
171
|
+
let vc = UINavigationController(rootViewController: myFirstViewController)
|
172
|
+
self.window = UIWindow(frame:UIScreen.main.bounds)
|
173
|
+
self.window?.rootViewController = vc
|
174
|
+
self.window?.makeKeyAndVisible()
|
175
|
+
}
|
176
|
+
return true
|
177
|
+
}
|
178
|
+
|
179
|
+
// MARK: UISceneSession Lifecycle
|
180
|
+
@available(iOS 13.0, *)
|
181
|
+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
182
|
+
// Called when a new scene session is being created.
|
183
|
+
// Use this method to select a configuration to create the new scene with.
|
184
|
+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
185
|
+
}
|
186
|
+
|
187
|
+
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
|
188
|
+
// Called when the user discards a scene session.
|
189
|
+
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
|
190
|
+
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
191
|
+
}
|
192
|
+
|
193
|
+
|
194
|
+
}
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
161
200
|
```ここに言語名を入力
|
162
201
|
swift
|
163
202
|
|