【发布时间】:2012-03-11 00:24:15
【问题描述】:
所以这是我的问题。
我正在使用 MainViewcontroller 的子视图以下列方式实现 TabBar:
@class MainViewController;
@interface MyAppDelegate : NSObject <UIApplicationDelegate>
{
// UITabBarController root controller view
UITabBarController *rootController;
}
// Added
@property (nonatomic, retain) IBOutlet UITabBarController *rootController;
@end
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary
*)launchOptions
{
// Added root controller
[self.window addSubview:rootController.view];
return YES;
}
我有 4 个视图控制器和 4 个选项卡。我在每个选项卡视图 .m 和主视图控制器中都指定了:
// Autoration of view orientations
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
我没有旋转到任何方向,但在我的主视图控制器中。我以为我需要覆盖主视图,但我的理解还不够。请为我提供帮助。
【问题讨论】:
标签: iphone objective-c ios4