How can I speed up a UITableView?

前端 未结 9 1866
广开言路
广开言路 2020-12-22 23:17

I have a UITableView with about 400 cells in 200 sections and it\'s a little sluggish in responding to user interaction (scrolling, selecting cells.) I\'ve made sure the met

9条回答
  •  生来不讨喜
    2020-12-22 23:42

    Are you using a lot of subviews?

    If so, a good technique is to, instead of adding a lot of labels and images, draw them using CoreGraphics.

    To do this, you'd have to subclass UITableViewCell and implement the -(void)drawRect:(CGRect)rect method.

提交回复
热议问题