CALayer compositingFilter, iOS 5 and CoreImage

半城伤御伤魂 提交于 2019-12-19 07:35:33

问题


The API Docs for CALayer state: (I'm not sure if the docs are up to date??)

compositingFilter A CoreImage filter used to composite the receiver’s contents with the background. Animatable.

@property(retain) id compositingFilter

...

Special Considerations While the CALayer class exposes this property, Core Image is not available in iOS. Currently the filters available for this property are undefined.

But CoreImage IS available on iOS5, so could I add a CoreImage filter to a CALayer and add that layer to another layer and expect it to work?

I want to add a sublayer to a layer and have it use a specific blend mode (multiply). I can't figure out how to do this otherwise.


回答1:


Although the docs have not been revised, and although Core Image is now partially available in iOS, only a tiny bit of its functionality is present. CALayer compositing filter, background filters, and so forth, are among the things that are not present. So you should go on ignoring the compositingFilter property.



来源:https://stackoverflow.com/questions/8378074/calayer-compositingfilter-ios-5-and-coreimage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!