回答編集履歴
2
修正
test
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
-
すみません、私が勘違いしていました。
|
2
|
-
|
3
|
-
Storyboardを
|
1
|
+
StoryboardのUIViewControllerを指定して生成する場合は以下の様にしてください。
|
4
2
|
|
5
3
|
|
6
4
|
|
7
5
|
```swift
|
8
6
|
|
9
|
-
let timeline = storyboard?.instantiateViewControllerWithIdentifier("TimelineViewController") as
|
7
|
+
guard let timeline = storyboard?.instantiateViewControllerWithIdentifier("TimelineViewController") as? TimelineViewController else {
|
8
|
+
|
9
|
+
return
|
10
|
+
|
11
|
+
}
|
10
12
|
|
11
13
|
presentViewController(timeline, animated: true, completion: nil)
|
12
14
|
|
@@ -14,6 +16,6 @@
|
|
14
16
|
|
15
17
|
|
16
18
|
|
17
|
-
|
19
|
+
Storyboard側では「Custom Class」 と 「Storyboard ID」を設定してください。
|
18
20
|
|
19
21
|
![image](7f7479f416d31fd698ebabdf1edcd4a8.png)
|
1
修正
test
CHANGED
@@ -1,5 +1,19 @@
|
|
1
|
+
すみません、私が勘違いしていました。
|
2
|
+
|
1
|
-
Storyboardの
|
3
|
+
Storyboardを呼ぶ場合は以下の様にしてください。
|
2
4
|
|
3
5
|
|
4
6
|
|
7
|
+
```swift
|
8
|
+
|
9
|
+
let timeline = storyboard?.instantiateViewControllerWithIdentifier("TimelineViewController") as! TimelineViewController
|
10
|
+
|
11
|
+
presentViewController(timeline, animated: true, completion: nil)
|
12
|
+
|
13
|
+
```
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
そしてStoryboard IDを設定してください。
|
18
|
+
|
5
|
-
![image](
|
19
|
+
![image](7f7479f416d31fd698ebabdf1edcd4a8.png)
|