【发布时间】:2019-06-04 21:54:53
【问题描述】:
我正在尝试用位图图像掩盖 CALayer。 而且我未能掩盖 CALayer。我的代码是:
// 'PreloadViewController layerWithImageNamed' create a layer and set it's contents as specified UIImage.
CALayer* title = [PreloadViewController layerWithImageNamed:@"pinkhug_txt.png"];
[[[self view] layer] addSublayer:title];
CALayer* title_mask = [PreloadViewController layerWithImageNamed:@"hug_mask.png"];
[title setMask:title_mask];
Apple 参考资料显示"CALayer in iPhone does not support mask property"。 但是有a postings about this on SO。 可能吗?或者我的代码有什么问题?
【问题讨论】:
-
我添加了“iphone”标签。谢谢。