CALayer删除透明遮罩

时间:2015-06-29 21:57:16

标签: ios objective-c ipad

我正在研究ios应用程序,我在使用CALayer时遇到了问题,它在我放入图层的每个图像上创建了一个透明蒙版。 请看下面的代码:

self.mask = [CALayer layer];
self.mask.contents = CFBridgingRelease(([UIImage imageNamed:@"launch screen.png"].CGImage));
self.mask.bounds = CGRectMake(0, 0, 200, 200);
self.mask.anchorPoint = CGPointMake(0.5, 0.5);
self.mask.position = CGPointMake(CGRectGetMidX(self.view.bounds), CGRectGetMidY(self.view.bounds));

self.imageView = _imageView;
self.view.layer.mask = self.mask;

请参考此图片,例如: http://31.media.tumblr.com/10cc0ba92377a2cba9fb35c9943fd2ca/tumblr_inline_n6zpokNxpC1qh9cw7.gif

0 个答案:

没有答案
相关问题