subclassed UITableViewCell - backgroundView covers up anything I do in drawRect

后端 未结 4 888
栀梦
栀梦 2020-12-03 16:03

I\'m trying to make a subclassed UITableViewCell where I draw an image in the upper right corner. I have it working perfectly - except when I set self.backgroundView, my bac

4条回答
  •  温柔的废话
    2020-12-03 16:49

    You shouldn't override the -drawRect: of a tablecell. Instead, create a new custom view and add it to the cell's contentView, and draw in there.

提交回复
热议问题