Could someone please tell me why [UIDevice currentDevice] orientation] always returns 0 in view did load? I want to change the layout of my screen based on current orientation. It doesn't work when I keep my device in landscap mode initially. I am expecting [UIDevice currentDevice] orientation] to return landscap orientation in that case but it doesn't. It gives right values then onwards! Could someone please help me to identify what's the issue. Thanks.
- (void)viewDidLoad
{
[super viewDidLoad];
[self resizeContentViews:[[UIDevice currentDevice] orientation]];
}