2
votes

I have an iPad app and I'm having an issue in my rootViewController. I'm getting the wrong frame for it for some reason. The rotation works fine visually, but when I'm in landscape mode my width and height are reversed. Logging the frame I get the following:

Portrait: self view frame = {{0, 20}, {768, 1004}}
Landscape: self view frame = {{20, 0}, {748, 1024}}

That 20px for the status bar is moving as it should. But those values should be flipped. This view has a UIScrollView as a subview and it's frame is adjusting as it should. Has anyone come across this before?

1

1 Answers

0
votes

If the width and height were reversed, the origin would then be wrong... I think this is the expected behaviour, as these coordinates are in the super view's system. What do you get with the bounds rectangle?