質問編集履歴

2

追加

2020/08/27 09:11

投稿

sunglass
sunglass

スコア303

test CHANGED
File without changes
test CHANGED
@@ -65,3 +65,87 @@
65
65
 
66
66
 
67
67
  現在ミニマムで再現中です。
68
+
69
+
70
+
71
+ ミニマムだと再現できました。。
72
+
73
+ NavigationControllerを後付けだと上手くいかないのでしょうか・・・?
74
+
75
+ Stroyboard上に出てくるNavigationbarとBackボタンが自分のプロジェクト上には表示されていません。。
76
+
77
+ ```ここに言語を入力
78
+
79
+ import UIKit
80
+
81
+
82
+
83
+ class TestViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
84
+
85
+
86
+
87
+ @IBOutlet weak var tableView: UITableView!
88
+
89
+
90
+
91
+ let TODO = ["牛乳を買う", "掃除をする", "アプリ開発の勉強をする"]
92
+
93
+
94
+
95
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
96
+
97
+ return TODO.count
98
+
99
+ }
100
+
101
+
102
+
103
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
104
+
105
+ // セルを取得する
106
+
107
+ let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
108
+
109
+ // セルに表示する値を設定する
110
+
111
+ cell.textLabel!.text = TODO[indexPath.row]
112
+
113
+ return cell
114
+
115
+ }
116
+
117
+
118
+
119
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
120
+
121
+
122
+
123
+ // セルの選択を解除
124
+
125
+ tableView.deselectRow(at: indexPath, animated: true)
126
+
127
+
128
+
129
+ // 次の画面へ
130
+
131
+ performSegue(withIdentifier: "toNext", sender: indexPath.row)
132
+
133
+ }
134
+
135
+
136
+
137
+
138
+
139
+ override func viewDidLoad() {
140
+
141
+ super.viewDidLoad()
142
+
143
+
144
+
145
+ }
146
+
147
+ }
148
+
149
+
150
+
151
+ ```

1

追加

2020/08/27 09:11

投稿

sunglass
sunglass

スコア303

test CHANGED
File without changes
test CHANGED
@@ -48,4 +48,20 @@
48
48
 
49
49
 
50
50
 
51
- 詳しいよろしくお願いします。
51
+ 詳しいよろしくお願いします。
52
+
53
+
54
+
55
+ ![イメージ説明](4e9b0de49da09de0af16286b9596978d.png)
56
+
57
+ Storyboardのイメージ画像追加
58
+
59
+
60
+
61
+ ![イメージ説明](d7f6708a0fb33248e5583b7115ec0140.png)
62
+
63
+ Kind:Show(e.g.Push)設定画像
64
+
65
+
66
+
67
+ 現在ミニマムで再現中です。