質問編集履歴

1

追記です。Appdelegate.swiftを追加しました

2019/06/14 23:43

投稿

ueda_kesuke
ueda_kesuke

スコア34

test CHANGED
File without changes
test CHANGED
@@ -117,3 +117,99 @@
117
117
  雑な質問で申し訳ないのですが、ご教授いただきたいです????‍♂️
118
118
 
119
119
  足りない情報などありましたら、おっしゃっていただけるとありがたいです!
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ ```swift
128
+
129
+ import UIKit
130
+
131
+
132
+
133
+ @UIApplicationMain
134
+
135
+ class AppDelegate: UIResponder, UIApplicationDelegate {
136
+
137
+
138
+
139
+ var window: UIWindow?
140
+
141
+ var name: String = ""
142
+
143
+ var gender: String = ""
144
+
145
+ var score: Int = 0
146
+
147
+ var records: [AnyObject] = []
148
+
149
+
150
+
151
+
152
+
153
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
154
+
155
+ // Override point for customization after application launch.
156
+
157
+ return true
158
+
159
+ }
160
+
161
+
162
+
163
+ func applicationWillResignActive(_ application: UIApplication) {
164
+
165
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
166
+
167
+ // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
168
+
169
+ }
170
+
171
+
172
+
173
+ func applicationDidEnterBackground(_ application: UIApplication) {
174
+
175
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
176
+
177
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
178
+
179
+ }
180
+
181
+
182
+
183
+ func applicationWillEnterForeground(_ application: UIApplication) {
184
+
185
+ // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
186
+
187
+ }
188
+
189
+
190
+
191
+ func applicationDidBecomeActive(_ application: UIApplication) {
192
+
193
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
194
+
195
+ }
196
+
197
+
198
+
199
+ func applicationWillTerminate(_ application: UIApplication) {
200
+
201
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
202
+
203
+ }
204
+
205
+
206
+
207
+
208
+
209
+ }
210
+
211
+
212
+
213
+
214
+
215
+ ```