iOS. Has Anyone Found a Way to KeyFrame UIView Attributes?
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,
DougCheck 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
.
精彩评论