回答編集履歴

1

view

2018/10/04 00:44

投稿

fuzzball
fuzzball

スコア16731

test CHANGED
@@ -1 +1,19 @@
1
1
  `cell.backgroundColor`ではなく`cell.contentView.backgroundColor`にして下さい。
2
+
3
+
4
+
5
+ と思ったけど、その上にViewが乗ってるみたいですね‥。
6
+
7
+ そのViewの`.backgroundColor`を変更して下さい。
8
+
9
+
10
+
11
+ とりあえずこれでいけるかも。
12
+
13
+
14
+
15
+ ```swift
16
+
17
+ cell.contentView.subviews.first?.backgroundColor = dataSource[indexPath.row]
18
+
19
+ ```