Iphone 从UIViewController切换到UINavigationController选项卡栏
我需要从UIViewController导航到UINavigationController,下面的代码可以做到这一点,但切换后,底部的选项卡栏消失,我得到了股票Iphone 从UIViewController切换到UINavigationController选项卡栏,iphone,objective-c,ios6,xcode4.5,Iphone,Objective C,Ios6,Xcode4.5,我需要从UIViewController导航到UINavigationController,下面的代码可以做到这一点,但切换后,底部的选项卡栏消失,我得到了股票 HomeViewController *homeList = [self.storyboard instantiateViewControllerWithIdentifier:@"homeList"]; UINavigationController *uc = [self.storyboard instantiateViewContro
HomeViewController *homeList = [self.storyboard instantiateViewControllerWithIdentifier:@"homeList"];
UINavigationController *uc = [self.storyboard instantiateViewControllerWithIdentifier:@"homeNav"];
uc = [[UINavigationController alloc] initWithRootViewController:homeList];
[self presentModalViewController:uc animated:YES];
问题应该在presentModal中,但我不知道如何处理这个问题。我不熟悉Objective C和iOS开发。这是因为您将其作为模态控制器呈现,因此不会显示选项卡栏。模态控制器设计用于显示中断当前工作流程的屏幕,以显示一些新信息,请参见此处了解模态控制器的工作方式 如果您需要导航控制器,使用导航控制器而不是viewController初始化选项卡控制器肯定更有意义,然后您可以使用导航控制器从一个屏幕移动到下一个屏幕
[self.navigationController pushViewController:someController animated:YES];
我使用这个
UINavigationController*uc=[self.storyboard instanceeviewcontrollerwhiteIdentifier:@“homeNav”];[self.navigationController pushViewController:uc动画:是]代码>并且它不会工作。我无法更改UINavigationController。