UITableView cell background color

前端 未结 8 798
别那么骄傲
别那么骄傲 2020-12-08 03:13

how to set different background colors for cells in a UITableView (specifically rainbow color for seven cells)

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 03:45

    You can set it like so:

    cell.contentView.backgroundColor = [UIColor colorWithRed:249.0/255 green:237.0/255 blue:224.0/255 alpha:1.0];
    

提交回复
热议问题