1

My app (target iOS 5+, uses ARC and storyboards, for the App Store) uses some rotation transforms. There's a bug where an in-call status bar (such as if there's an ongoing phone call or microphone recording) causes the views to mutate beyond what the transform describes. To diagnose the problem I wrote a simple test app* that plays with a view's transform.

Initially (reproduced in simulators 5.0 and 6.1, and hardware 6.1) it looks like

enter image description here

After rotating by 20 degrees:

enter image description here

Still ok! But something weird happens when I toggle the in-call status bar (command-T):

enter image description here

Ok, well maybe it'll revert if I turn off the in-call status bar

enter image description here

Disaster! Let's try resetting the view's transform to CGAffineTransformIdentity

enter image description here

Oh what have I gotten myself into?!

Anyway, I'm new to CGAffineTransforms, and Quartz 2D as a whole, so I'd appreciate if someone could tell me why this is happening. The code is available on Github* if you want to poke around.

*Note that the code has been updated with a solution.

Spencer Williams
  • 902
  • 8
  • 26

1 Answers1

1

This is happening because toggling the in-call status bar changes the view frame, which (if it's set to autoresize subviews) autoresizes subviews accordingly. If the transformed view has any flexible margins, it could skew as shown in the above screenshots. To make it not skew like that, turn on all four struts.

Spencer Williams
  • 902
  • 8
  • 26