Animate UIImage in UIImageView Up & Down (Like it's hovering) Loop
问题 Hello I have an image that I'd like to move up and down (Up 10 pixels and down 10 pixels) so that my image appears to be hovering. How can I do this with simple animation thanks so much!!! 回答1: You could use Core Animation to animate the position of the views layer. If you configure the animation to be additive you won't have to bother calculating the new absolute position, just the change (relative position). CABasicAnimation *hover = [CABasicAnimation animationWithKeyPath:@"position"];