質問編集履歴
2
諸々
test
CHANGED
File without changes
|
test
CHANGED
@@ -221,3 +221,39 @@
|
|
221
221
|
TableViewCell.xib
|
222
222
|
|
223
223
|

|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
※追記
|
230
|
+
|
231
|
+
ご回答通りに記述してもだめだったので、
|
232
|
+
|
233
|
+
```Swift
|
234
|
+
|
235
|
+
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
//gurad文でカスタムセルを読み込み、無理ならUITableViewCell()を返す
|
240
|
+
|
241
|
+
guard let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as? TableViewCell else { return UITableViewCell() }
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
// cell.backgroundColor = dataSource[indexPath.row]
|
246
|
+
|
247
|
+
cell.contentView.backgroundColor = dataSource[indexPath.row]
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
return cell
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
}
|
256
|
+
|
257
|
+
```
|
258
|
+
|
259
|
+
と書きましたが、だめでした。
|
1
諸々
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,23 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
下記の記事のサンプルコードと同じに書いたのですが、ダメでした。
|
28
|
+
|
29
|
+
↓
|
30
|
+
|
31
|
+
[Qiita そのまま使える!iOSアプリを作るためのswiftサンプル集](https://qiita.com/ryupaka/items/54192d304253103c07e9#認証機能localauthenticationsample)
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
同じコードなのに動作しないのは、Swift4から仕様が変わったからでしょうか?
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
Qiitaの記事は最終更新日が比較的新しいので、コード的にも今の環境に適していると思うのですが、そうでなければ僕のコードが間違っているなのでしょうが、どこが間違いかわかりません。
|
40
|
+
|
41
|
+
|
42
|
+
|
27
|
-
ど
|
43
|
+
どうかダメなのか指摘していただきたいです。
|
28
44
|
|
29
45
|
|
30
46
|
|