开发者

resizing a UIImageView using Core Animation

开发者 https://www.devze.com 2022-12-24 12:23 出处:网络
I would like to increase the height of a UIImageView with every animation frame using Core Animation. Is there any way to do this?

I would like to increase the height of a UIImageView with every animation frame using Core Animation. Is there any way to do this?

I have done this using an NSTimer. I set the UIImageView contentMode to scalingMode and then with each tick of the timer i was incrementing the height.

Is there a cleaner,开发者_运维技巧 high level way of doing this using Core Animation?

Thanks, Harikant Jammi


With Core Animation, you would generally pick a desired size, and a duration, and the system will figure out the keyframes to get you there. You CAN enter a bunch of interim points, and a bunch of times, but you won't be able to get exactly to the set-each-frame-value-precisely point. The system will do it's best to make it smooth.

0

精彩评论

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