开发者

iOS. Has Anyone Found a Way to KeyFrame UIView Attributes?

开发者 https://www.devze.com 2023-03-14 06:23 出处:网络
One of the things sorely lacking from iOS is the ability to set keys on an attribute/attributes and interpolate between them using a spline. Has anyone thought about this and/or found an approach to g

One of the things sorely lacking from iOS is the ability to set keys on an attribute/attributes and interpolate between them using a spline. Has anyone thought about this and/or found an approach to get around this? Is everyone using Cocos2d for this sort of thing? Cocos2d is way more capabilit开发者_Python百科y then I need?

Thanks,

Doug


Check out the CAKeyframeAnimation class. UIViews use Core Animation layers, so a Core Animation...er...animation that you apply to a view’s layer gets applied to its contents as well. Most appearance-related properties on CALayer are animatable—obvious ones like frame and opacity, for instance, but also things like backgroundColor and cornerRadius.

0

精彩评论

暂无评论...
验证码 换一张
取 消