Moving an object (UIButton) through a circular path by keeping the parent view static
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.
- Create a
CGPathRef
that contains the path along which you want to animate the view. - Create a
CAKeyframeAnimation
. - Assign the path to the
animation.path
property. - Add the animation to the view's layer.
精彩评论