【发布时间】:2014-06-25 18:34:34
【问题描述】:
当我点击 Test2 View Controller 中的 按钮 时,我的标签栏应该停留在屏幕上。
我已将 Test 3 View Controller 的底栏设置为 推断,并尝试了 半透明标签栏。我已将转场从 push 更改为 modal。我试过this solution,但不适用于iOS7。
TestTabBarController.m 这也不起作用:
- (void)viewDidLoad
{
Test3ViewController * viewController1 = [[Test3ViewController alloc] initWithNibName:nil bundle:nil];
UINavigationController *homeNavi=[[UINavigationController alloc]initWithRootViewController:viewController1];
self.viewControllers = [NSArray arrayWithObjects:homeNavi, nil];
}
这也行不通:
- (IBAction)buttonpress:(id)sender {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
Test3ViewController * test3ViewController = (Test3ViewController *)[storyboard instantiateViewControllerWithIdentifier:@"test3View"];
[self.navigationController pushViewController:test3ViewController animated:YES];
}
【问题讨论】:
标签: objective-c xcode ios7 uitabbarcontroller