質問編集履歴

1

調べてみてわかったこと

2017/11/16 08:14

投稿

oOz
oOz

スコア18

test CHANGED
File without changes
test CHANGED
@@ -9,3 +9,33 @@
9
9
  このようになるコードを書きたいのですが、調べてみてもわかりません。
10
10
 
11
11
  漠然とした質問で申し訳ございませんが、よろしくお願いいたします。
12
+
13
+
14
+
15
+ ```swift
16
+
17
+ func applicationDidEnterBackground(_ application: UIApplication) {
18
+
19
+ // 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.
20
+
21
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
22
+
23
+
24
+
25
+ }
26
+
27
+ func applicationWillEnterForeground(_ application: UIApplication) {
28
+
29
+ // 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.
30
+
31
+
32
+
33
+  }
34
+
35
+ ```
36
+
37
+ タイミングは上記の間にコードの後ろに書き足せばいけると思いますが、そもそもの取得の方法が調べてもわかりません。
38
+
39
+ 自分でも調べて出てきたコードはコピペして試してみましたが、コードが古いのかエラーなどが出てできませんでした。
40
+
41
+ わかりづらくてすいませんが、よろしくお願いいたします。