回答編集履歴
5
コード記述
test
CHANGED
@@ -83,8 +83,6 @@
|
|
83
83
|
if let secondSettingVC = segue.destination as? SecondSettingViewController {
|
84
84
|
|
85
85
|
secondSettingVC.soundSetting = soundSetting
|
86
|
-
|
87
|
-
secondSettingVC.soundRate = soundRate
|
88
86
|
|
89
87
|
secondSettingVC.testdelegate = self // 設定画面のtestdelegateに自身をセット
|
90
88
|
|
4
コード記述
test
CHANGED
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
secondSettingVC.soundRate = soundRate
|
88
88
|
|
89
|
-
secondSettingVC.testdelegate = self // 設定画面のtestdelegateに自身
|
89
|
+
secondSettingVC.testdelegate = self // 設定画面のtestdelegateに自身をセット
|
90
90
|
|
91
91
|
}
|
92
92
|
|
3
コード記述
test
CHANGED
@@ -86,7 +86,7 @@
|
|
86
86
|
|
87
87
|
secondSettingVC.soundRate = soundRate
|
88
88
|
|
89
|
-
secondSettingVC.testdelegate = self //
|
89
|
+
secondSettingVC.testdelegate = self // 設定画面のtestdelegateに自身(pvc)をセット
|
90
90
|
|
91
91
|
}
|
92
92
|
|
2
コード記述
test
CHANGED
@@ -75,6 +75,22 @@
|
|
75
75
|
|
76
76
|
|
77
77
|
(略)
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
82
|
+
|
83
|
+
if let secondSettingVC = segue.destination as? SecondSettingViewController {
|
84
|
+
|
85
|
+
secondSettingVC.soundSetting = soundSetting
|
86
|
+
|
87
|
+
secondSettingVC.soundRate = soundRate
|
88
|
+
|
89
|
+
secondSettingVC.testdelegate = self // デリゲートをセット
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
}
|
78
94
|
|
79
95
|
|
80
96
|
|
1
コード記述
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
razumaさん
|
10
10
|
|
11
|
-
|
11
|
+
分かりやすい説明のおかげで解決できました。ありがとうございました。
|
12
12
|
|
13
13
|
|
14
14
|
|
@@ -17,8 +17,6 @@
|
|
17
17
|
■ プロトコル
|
18
18
|
|
19
19
|
import UIKit
|
20
|
-
|
21
|
-
|
22
20
|
|
23
21
|
protocol testDelegate: class {
|
24
22
|
|
@@ -30,7 +28,11 @@
|
|
30
28
|
|
31
29
|
|
32
30
|
|
31
|
+
|
32
|
+
|
33
33
|
■ 設定画面
|
34
|
+
|
35
|
+
import UIKit
|
34
36
|
|
35
37
|
class SecondSettingViewController: UIViewController { // デリゲート処理させるところ
|
36
38
|
|
@@ -62,11 +64,11 @@
|
|
62
64
|
|
63
65
|
|
64
66
|
|
67
|
+
|
68
|
+
|
65
69
|
■ ページを管理するViewController
|
66
70
|
|
67
71
|
import UIKit
|
68
|
-
|
69
|
-
|
70
72
|
|
71
73
|
class PageViewController: UIPageViewController, UIPageViewControllerDataSource,UIPageViewControllerDelegate, testDelegate { // 継承
|
72
74
|
|
@@ -98,13 +100,13 @@
|
|
98
100
|
|
99
101
|
|
100
102
|
|
103
|
+
|
104
|
+
|
101
105
|
■ ページングされるコンテツのViewController
|
102
106
|
|
103
107
|
import UIKit
|
104
108
|
|
105
109
|
import AVFoundation
|
106
|
-
|
107
|
-
|
108
110
|
|
109
111
|
class PageContentViewController: UIViewController, AVAudioPlayerDelegate {
|
110
112
|
|