0

You can rotate an UIImageView like this..

 myImage.transform=CGAffineTransformMakeRotation(M_PI/2)

But how do you get a group of images to rotate around point. Say 8 UIButtons arranged in a circle, rotating around a point in the centre.

Any ideas?

2 Answers 2

0

Take a look at the CGAffineTransformMakeTranslation() transformation. Your x and y values will be points along a circle.

0

My recommendation would be to place these 8 UIButtons within a transparent superview that encompasses all of them, then rotate that one superview about its center. If you need to adjust the point of rotation for the superview, you can set its layer's anchorPoint property to something other than (0.5, 0.5).

2
  • Code for making/putting in a transparent superview? Cheers
    – Sam Jarman
    Aug 1, 2010 at 2:47
  • @Sam Jarman - Simply create a UIView, set its backgroundColor to [UIColor clearColor], and add the buttons to it.
    – Brad Larson
    Aug 2, 2010 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.