0

I have a view with many subviews. After applying the following transform

[self setTransform:CGAffineTransformMakeRotation(angle)];

I'm not able to get the updated frame of the subviews. When doing

CGRect frame = subview.frame;

It's always the original frame before transform.

How can I calculate the frame after the rotation ?

Many thanks,

Best

John smith
  • 355
  • 4
  • 17
  • 1
    Possible duplicate of [Get size of UIView after applying CGAffineTransform](https://stackoverflow.com/questions/2694785/get-size-of-uiview-after-applying-cgaffinetransform) – shallowThought May 31 '17 at 19:14
  • It's not a dulicate as I don't want to get the size of the view after the transform but the frame of a subview inside the view – John smith May 31 '17 at 20:00
  • 1
    That should work the same way imo. (`... CGRect transformedBounds = CGRectApplyAffineTransform(subview.bounds, view.transform); ...`). No time to test and write an answer in the moment. Sorry. – shallowThought May 31 '17 at 20:21

0 Answers0