Can you disable rotation globally in an iOS app?

ios, xcode

Solution

in root view controller's method:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

set 'return NO';

this should do for all the Views.

Problem

I have an app made up of a lot of view controllers... in the project summary I've set Portrait orientation as the only supported device orientation. However, the app still gets messed up when turned sideways. My question is, is there a way to globally disable autorotation through app delegate or something? Or do I have to go into all of my view controllers and add the "shouldAutorotateToInterfaceOrientation" method? Just don't want to miss adding it to one or something... Thanks!

Original source