質問編集履歴
1
コード一部修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
|
92
92
|
|
93
|
-
|
93
|
+
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int{ //セクションごとの行数を返す
|
94
94
|
|
95
95
|
return ap.tasks.count
|
96
96
|
|
@@ -98,7 +98,7 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
|
101
|
-
|
101
|
+
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ //各行に表示するセルを返す
|
102
102
|
|
103
103
|
let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "MyCell", for: indexPath)
|
104
104
|
|
@@ -116,7 +116,7 @@
|
|
116
116
|
|
117
117
|
|
118
118
|
|
119
|
-
|
119
|
+
func numberOfSections(in tableView: UITableView) -> Int { //セクション数を返す(初期値は1)
|
120
120
|
|
121
121
|
return 1 //今回は別に何かセクション分けする必要はないので必ず1を返す
|
122
122
|
|
@@ -124,7 +124,7 @@
|
|
124
124
|
|
125
125
|
|
126
126
|
|
127
|
-
|
127
|
+
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { //セクションタイトルを返す(初期値は空)
|
128
128
|
|
129
129
|
return ""
|
130
130
|
|
@@ -166,6 +166,12 @@
|
|
166
166
|
|
167
167
|
```
|
168
168
|
|
169
|
+
```
|
170
|
+
|
171
|
+
tasks = ["テスト2チェック", "テスト4だよ", "こんにちは世界", "", "テストだよ", "テスト2だよ", "テスト3だよ", "テストじゃい!1", "テストじゃち"]
|
172
|
+
|
173
|
+
```
|
174
|
+
|
169
175
|
|
170
176
|
|
171
177
|
AppDelegateでは
|