当我从designworks.xib(designworks.m,designworks.h)切换到MainStoryboard FirstViewController(这是一个选项卡栏控制器,选项卡中的第一个控制器)时,它将内容加载到情节提要中,但没有加载到选项卡栏中底部导航。

- (IBAction)backToHome:(id)sender {
    /*
    FirstViewController *fvc = [[FirstViewController alloc] initWithNibName:nil bundle:nil];
    [self presentViewController:fvc animated:YES completion:nil];
     */
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    FirstViewController *fvc = [storyboard instantiateViewControllerWithIdentifier:@"FirstViewController"];
    fvc.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    [self presentViewController:fvc animated:YES completion:nil];
}

最佳答案

如果您的第一个视图控制器在“标签栏控制器”内部,请推“标签栏控制器”。

关于ios - 切换 View 时presentViewController不加载选项卡栏,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15924706/

10-13 02:48