开发者

Moving an object (UIButton) through a circular path by keeping the parent view static

开发者 https://www.devze.com 2023-02-18 18:13 出处:网络
How do 开发者_开发问答I move some buttons into a circular path (using the center of an circular UIView) by 45 degree each time any of the buttons is clicked? You can say it\'s just like JOG WHEEL.

How do 开发者_开发问答I move some buttons into a circular path (using the center of an circular UIView) by 45 degree each time any of the buttons is clicked? You can say it's just like JOG WHEEL.


  1. Create a CGPathRef that contains the path along which you want to animate the view.
  2. Create a CAKeyframeAnimation.
  3. Assign the path to the animation.path property.
  4. Add the animation to the view's layer.
0

精彩评论

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