Is there any way to animate uiview moving with cicle trajectory?
You will have to create a circular path and animate your view on the path. You can use UIBezierPath to create a circular path . Here is an example that does what exactly you want.
There are a couple of options. Probably the simplest is to place your view on a parent view, and then animate rotating the parent view around its Z axis.
I guess you could also build a transform that shifts your view, then rotates it, and animate the transform to different rotation values. I'd have to tinker with that. I know the first approach would be quick and easy to set up.
As the other poster said, you could also create a keyframe animation that uses a CGPath to animate your view along a curve that approximated the shape of a circle, but that would be much more work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With