UITableViewCell show white background and cannot be modified on iOS7

后端 未结 14 1393
轻奢々
轻奢々 2020-11-28 18:42

I\'ve implemented a custom table view cell class that inherit from UITableViewCell. The tableview contains a background image, so I want cell\'s background to b

14条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 18:53

    I investigated it a little bit and found out that the cell backgroundColor is set by the Appearance system. So if all cells in your application have clear background, the easiest solution would be:

    [[UITableViewCell appearance] setBackgroundColor:[UIColor clearColor]];
    

    And even if they have different background, clear color seems to be the most convenient as the default one.

提交回复
热议问题