我正在尝试用位图图像掩盖 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 参考资料说“iPhone 中的 CALayer 不支持掩码属性”。但是在 SO 上有一个关于这个的帖子。可能吗?或者我的代码有什么问题?