質問編集履歴
1
コードを変えました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,15 +1,77 @@
|
|
1
|
-
```
|
1
|
+
```
|
2
2
|
|
3
|
-
|
3
|
+
import UIKit
|
4
4
|
|
5
|
+
|
6
|
+
|
7
|
+
class FirstViewController: UIViewController {
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
@IBAction func change(_ sender: Any) {
|
16
|
+
|
17
|
+
let storyboard: UIStoryboard = self.storyboard!
|
18
|
+
|
19
|
+
let nextView = storyboard.instantiateViewController(withIdentifier: "second")
|
20
|
+
|
5
|
-
|
21
|
+
let navi = UINavigationController(rootViewController: nextView)
|
22
|
+
|
23
|
+
// アニメーションの設定
|
24
|
+
|
25
|
+
// navi.modalTransitionStyle = .coverVertical
|
26
|
+
|
27
|
+
present(navi, animated: true, completion: nil)
|
28
|
+
|
29
|
+
}
|
30
|
+
|
31
|
+
override func viewDidLoad() {
|
32
|
+
|
33
|
+
super.viewDidLoad()
|
34
|
+
|
35
|
+
// Do any additional setup after loading the view, typically from a nib.
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
override func didReceiveMemoryWarning() {
|
46
|
+
|
47
|
+
super.didReceiveMemoryWarning()
|
48
|
+
|
49
|
+
// Dispose of any resources that can be recreated.
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
6
62
|
|
7
63
|
```
|
8
64
|
|
9
|
-
|
65
|
+
**1**
|
10
66
|
|
11
|
-
|
67
|
+
![FirstView!](dfc6b8e76356b75bc64aa2dbe7dee263.png)
|
12
68
|
|
69
|
+
**2**
|
13
70
|
|
71
|
+
![SecondView](ed568365e3f04b2a65d4c5833e10dd34.png)
|
14
72
|
|
73
|
+
**3**
|
74
|
+
|
75
|
+
![navi](fd4ebf51164b9c536ec6c70056675d2c.png)
|
76
|
+
|
15
|
-
|
77
|
+
私は1から2のように、遷移後、遷移先の画面の上にナビゲーションコントローラのバーがなく、タブバーが表示された状態にしたいのですが、ナビゲーションコントローラナビゲーションコントローラを使ってやると遷移先の画面が3のようになります。2のようにするにはどうしたらいいですか?
|