I have some objects in a view that I want to move around their own points on a screen. I want them to appear almost stationary, but with a slight circular motion (not rotation, the items will remain straight and level), kind of like a buoy bobbing up and down in the ocean with some horizontal movement as well.
My basic thought is to move the anchor point around the object. I only want a subtle effect, the objects won’t be moving around the whole screen. At most 10-20 points. They will be UIButtons still capable of being pressed. So far everything I’ve searched for results in rotation about a point, and not what I’m after.
You can use
CAKeyframeAnimationto make your object follow a small circle or any other path that suits your needs. Here is how you create and use aCAKeyframeAnimationobject.This should get you started. Please note you need to import QuartzCore framework in order for this to work.