質問するログイン新規登録

回答編集履歴

1

view

2018/10/04 00:44

投稿

fuzzball
fuzzball

スコア16733

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