Possible Duplicate:
shouldAutorotateToInterfaceOrientation doesn’t work
I am pushing a UIViewController into a UINavigationController after I call pushViewController
the shouldAutoRotate method is getting called and it is getting into the iPhone. However, when I rotate the device this is no longer called. Why is this?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
if (IS_IPHONE){
return interfaceOrientation == UIInterfaceOrientationPortrait;
} else {
return YES;
}
}
I want this UIViewController to be on portrait only. My viewWillLayoutSubviews is getting called though. To give more context the willAnimate methods is all getting called