Why doesn't UITableViewCell background color work (set in interface builder)?

前端 未结 14 1766
青春惊慌失措
青春惊慌失措 2020-12-23 11:43

Why doesn\'t UITableViewCell background color work (set in interface builder)?

I note from some searching that the follow code set in your custom subclass of UITable

14条回答
  •  时光说笑
    2020-12-23 11:59

    Trying to set the background colour of the UITableViewCell itself is not how you should be doing it. A table cell has a collection of five useful views you can access, one of which is backgroundView.

    Recommended reading:

    http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html

    and then:

    http://cocoawithlove.com/2010/12/uitableview-construction-drawing-and.html

提交回复
热议问题