Mask a whole animation happening in a UIImageView
I need to mask a whole animation that takes place in a UIImageView. I tried subclassing the UIImageView and doing the masking in its drawRect call but that doesn't get called on every frame of the animation as I expected (it doesn't get call开发者_如何学运维ed at all actually) even though the animation plays fine.
Anyone has any experience on this?
Since the CIFilter
public API is missing on iPhone OS, there's no way to do compositing using UIView
or CALayer
.
This means that the answer is: You cannot mask the contents of UIImageView
, animated or not.
I've filed a radar bug request because I feel that the addition of the CIFilter
API would be a great enhancement to Cocoa Touch and expand the possibilities of UIView/CALayer based UI design a lot. At the moment, if you want to do compositing on the iPhone, you have to use Quartz (slow) or OpenGL (doing everything yourself).
If you agree on the usefulness of CIFilters for iPhone OS, please consider filing a request on radar. The more requests, the sooner Apple will care about it.
精彩评论