UITableView cornerRadius with bandwidth issues on iOS

I have an interesting notification with scrolling on UITableViews cornerRadius, borderWidthand borderColor.

self.tableView.layer.cornerRadius = 10.f;
self.tableView.layer.borderWidth = 1.0f;
self.tableView.layer.borderColor = [UIColor whiteColor].CGColor;

If I delete borderWidthand borderColorthan scroll, I get 60 FPS without any problems. So far I am adding these two properties to reduce the FPS layer.

Does anyone have a suggestion or explanation why this strange behavior happens?

Many thanks!

+5
source share
2 answers

I just found out that cornerRadius with borderWidth bandwidth is sluggish in the table. Therefore, instead of the radius 10.f, I changed to 5.f, and the performance increased surprisingly. Still not perfect, but noticeably better ...

+1

CALayer Rasterize .

self.tableView.layer.shouldRasterize = YES;

.

+6

All Articles