I'm having some lay-outing issues, when I start my app in portrait mode and then turn it to landscape mode, views opened after that are returning a wrong value for the rotation.
For instance, I open a view in landscape mode after it was rotated from portrait mode, when I log the rotation it still returns portrait mode:
NSLog(@"%u", [[UIDevice currentDevice] orientation]); // 4
NSLog(@"%f / %f", self.view.frame.size.width, self.view.frame.size.height); // 748.000000 / 1024.000000
When I rotate the iPad to portrait mode and back to landscape mode it returns the right sizes
NSLog(@"%u", [[UIDevice currentDevice] orientation]); // 1
NSLog(@"%f / %f", self.view.frame.size.width, self.view.frame.size.height); // 1024.000000 / 704.000000
Is there anything I need to do to make a newly added view adapt to the rotation?