How to make a custom drawn UITableViewCell resize properly?

前端 未结 4 1006
既然无缘
既然无缘 2021-02-09 11:19

For performance reasons, I draw the strings for my UITableViewCell in a custom view that overrides its drawRect method to draw strings directly in the view rectangle using NSStr

4条回答
  •  难免孤独
    2021-02-09 11:58

    I had a similar problem with a UIView inside a UITableViewCell. I solved it by changing the UIView's contentMode to UIViewContentModeLeft. (I wrote it up here, with screenshots.)

提交回复
热议问题