0

is there a way to extract rotation information (only , without scale/translation) info from a CGAffineTransform ?

I would like to apply the rotation to another object, but without setting translation/scale.

Nico AD
  • 1,657
  • 4
  • 31
  • 51
  • Maybe answered here? http://stackoverflow.com/questions/2051811/iphone-sdk-cgaffinetransform-getting-the-angle-of-rotation-of-an-object – Stefan Aug 09 '11 at 07:18

1 Answers1

0

I don't think you can extract the values used in a function and reference them directly in some other function.

What you can do is define a CGFloat angle struct outside any of the functions and just reuse it whenever you need the same value for a rotation transform.

MiguelB
  • 1,913
  • 18
  • 20
  • the rotation is calculated via multi touch event, I dont know how to maintain angle from that code : CGAffineTransform incrementalTransform = [self incrementalTransformWithTouches:[event touchesForView:self]]; self.transform = CGAffineTransformConcat(originalTransform, incrementalTransform); – Nico AD Aug 09 '11 at 10:26