小编Ste*_*hen的帖子

以模态方式呈现UITabBarController - 自动旋转问题

我正在尝试使用以下代码以模态方式呈现UITabBarController:

// Declare all view controllers.
TabOne *tabOne = [[TabOne alloc] initWithNibName:@"TabOne" bundle:nil];
TabTwo *tabTwo = [[TabTwo alloc] init];
TabThree *tabThree = [[TabThree alloc] init];

// Set each view controller's delegate to self.
tabOne.delegate = self;
tabTwo.delegate = self;
tabThree.delegate = self;

// Set a title for each view controller.
tabOne.title = @"One";
tabTwo.title = @"Two";
tabThree.title = @"Three";

// Create a tab bar controller.
UITabBarController *tabBarController = [[UITabBarController alloc] init];
[tabBarController setViewControllers:[NSArray arrayWithObjects:tabOne,tabTwo,tabThree, nil]];

// Present the tab bar …
Run Code Online (Sandbox Code Playgroud)

modal-dialog uitabbarcontroller ios4

3
推荐指数
1
解决办法
2561
查看次数

标签 统计

ios4 ×1

modal-dialog ×1

uitabbarcontroller ×1