Rotation of ViewController in TabbarController

Posted by hanno on Stack Overflow See other posts from Stack Overflow or by hanno
Published on 2010-04-05T20:00:57Z Indexed on 2010/04/05 20:03 UTC
Read the original article Hit count: 269

I have a custom UIViewController in a UITabbarController and want to respond to rotation events. When a rotation occurs, the tabbarcontroller and the viewcontroller get rotated. However, the view in the viewcontroller doesn't get redrawn properly: the layout doesn't autoresize and it is black on parts of the screen.

The strange thing is that it works when I go to another tab and the back again to my original viewcontroller.

What could possibly be wrong? I checked that didRotateFromInterfaceOrientation:fromInterfaceOrientation is being called. However, the view.frame.size values are still the old ones from before the rotation. That's probably not correct.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about rotation