UIView не обрабатывает повороты, UIViewController делает.
Итак, все, что вам нужно, это создать UIViewController, который реализует shouldAutorotateToInterfaceOrientation и устанавливает этот контроллер как rootViewController для вашего UIWindow
Примерно так:
- (void) makeWindow
{
UIViewController * vc = [[[MyViewController alloc] init] autorelease];
UIWindow * window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[window setRootViewController:vc];
[window makeKeyAndVisible];
}
@interface MyViewController : UIViewController
@end
@implementation MyViewController
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.backgroundColor = [UIColor redColor];
//your view initialization here
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return YES;
}
@end