我有一个UITableViewCell其中里面有 5 个UILabelaUIButton和一个UIImageView填充单元格作为背景的 a。性能似乎有点慢,所以我正在考虑使用CoreGraphics它来改进它。CoreGraphics使用而不是UILabelassubViews会让事情变得更快,这是真的吗?如果是,为什么?
我有以下代码在单元格上绘制阴影:
[self.layer setBorderColor:[UIColor blackColor].CGColor];
[self.layer setShadowColor:[UIColor blackColor].CGColor];
[self.layer setShadowRadius:10.0];
[self.layer setCornerRadius:5.0];
[self.layer setShadowPath:[[UIBezierPath bezierPathWithRect:self.frame] CGPath]];