回答編集履歴

1

遷移について追記

2016/01/05 06:58

投稿

fuzzball
fuzzball

スコア16731

test CHANGED
@@ -1 +1,33 @@
1
+ ##スワイプ
2
+
1
3
  スワイプしたいViewに`UISwipeGestureRecognizer`を`addGestureRecognizer`して下さい。
4
+
5
+
6
+
7
+ ##遷移
8
+
9
+
10
+
11
+ #ViewController1からViewController2に遷移
12
+
13
+ ViewController1で、
14
+
15
+ ```swift
16
+
17
+ self.navigationController?.pushViewController(ViewController2(), animated: true)
18
+
19
+ ```
20
+
21
+
22
+
23
+ #ViewController2からViewController1に戻る
24
+
25
+ ViewController2の中で、
26
+
27
+ ```swift
28
+
29
+ self.navigationController?.popViewControllerAnimated(true)
30
+
31
+ ```
32
+
33
+