In particular, I am adding a compass to my app.
I want to place an arrow that rotates on top of a circular compass background. If you could link me to anything that describes stacking/superimposing images, I’d be grateful.
I couldn’t seem to find much via Google.
Use a couple of
UIImageViews, one for the compass background, and one for the arrow, and add them to your main application view. You should have something like this in some method in your main view controller:Of course,
compassBackgroundandarroware members of your view controller class.To animate the arrow, apply an affine transformation to the view:
If you are building your main view with Interface Builder, it is even easier: add the compass background and arrow to the view, connect them to the controller, and apply the transformation as explained above.