当我尝试为 View 添加边框时,我的 View 变得很慢
[self.userView setBackgroundColor:[UIColor whiteColor]];
[self.userView.layer setMasksToBounds:YES];
[self.userView.layer setCornerRadius:15.0f];
[self.userView.layer setBorderColor:[UIColor lightGrayColor].CGColor];
[self.userView.layer setBorderWidth:1.0f];
最佳答案
您可能需要将图层的 shouldRasterize
属性设置为 YES
。
关于iphone - 用 QuartzCore 制作边框很慢?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10004295/