回答編集履歴
2
修正
answer
CHANGED
@@ -3,6 +3,6 @@
|
|
3
3
|
```swift
|
4
4
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
5
5
|
// cell 作成
|
6
|
-
cell.contentView.backgroundColor = UIColor.
|
6
|
+
cell.contentView.backgroundColor = UIColor.lightGray
|
7
7
|
}
|
8
8
|
```
|
1
修正
answer
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
`cell`には`contentView`という`UIView`が乗っているのでそれの背景色を変えてみてください。
|
2
2
|
|
3
3
|
```swift
|
4
4
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
5
|
-
|
5
|
+
// cell 作成
|
6
|
-
|
6
|
+
cell.contentView.backgroundColor = UIColor.gray
|
7
|
-
|
7
|
+
}
|
8
8
|
```
|