Animate UIImage in UIImageView Up & Down (Like it's hovering) Loop

前端 未结 4 1333
情深已故
情深已故 2021-02-04 13:45

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 thank

4条回答
  •  别那么骄傲
    2021-02-04 14:27

    For such a task, it will be better to place an image in a sublayer of UIView, and then animate that sublayer frame. This tutorial could give you some idea: http://www.raywenderlich.com/2502/introduction-to-calayers-tutorial

提交回复
热议问题