我像这样创建图层
imageView.layer.masksToBounds = YES;
imageView.layer.cornerRadius = imageView.frame.size.height / 2;
imageView.layer.borderColor = kBGColor.CGColor;
imageView.layer.borderWidth = 2.0f;
imageView.layer.rasterizationScale = [UIScreen mainScreen].scale;
imageView.layer.shouldRasterize = YES;
imageView.clipsToBounds = YES;
如何删除它?
答案 0 :(得分:1)
删除图层的方式与删除UIView
个对象
for (CALayer *layer in imageView.layer.sublayers) {
[layer removeFromSuperlayer];
}