文件名称:应用蒙板图层-intel单cpu芯片组上电时序
文件大小:20.35MB
文件格式:PDF
更新时间:2024-07-30 20:55:30
iOS动画, core animation, 核心动画
清单4.5 应用蒙板图层 @interface ViewController () @property (nonatomic, weak) IBOutlet UIImageView *imageView; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; //create mask layer CALayer *maskLayer = [CALayer layer]; maskLayer.frame = self.layerView.bounds; UIImage *maskImage = [UIImage imageNamed:@"Cone.png"]; maskLayer.contents = (__bridge id)maskImage.CGImage; //apply mask to image layer self.imageView.layer.mask = maskLayer; } @end ios核心动画高级技巧 73图层蒙板