UITableView cornerRadius with border performance issues on iOS

后端 未结 2 1500
有刺的猬
有刺的猬 2021-01-18 19:33

I have some interesting notice with scrolling performance on UITableView with cornerRadius, borderWidth and borderColor e

相关标签:
2条回答
  • 2021-01-18 19:37

    CALayer having shouldRasterize property for this type of performance issue. Just set

    self.tableView.layer.shouldRasterize = YES;
    

    This single line saved my lot of time and work.

    0 讨论(0)
  • 2021-01-18 19:48

    I just found out that cornerRadius with borderWidth sluggish tableView performance by a lot. So instead of 10.f radius I changed to 5.f and performance has increased amazingly. Still not perfect but noticeably better...

    0 讨论(0)
提交回复
热议问题