Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/97.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios [情节提要选项卡控制器错误]_Ios_Storyboard_Tabbarcontroller - Fatal编程技术网

Ios [情节提要选项卡控制器错误]

Ios [情节提要选项卡控制器错误],ios,storyboard,tabbarcontroller,Ios,Storyboard,Tabbarcontroller,我的tabbarcontroller有问题。我正在使用故事板,并且在tabbarcontroller和viewcontroller之间使用导航控制器。我还有登录页。从登录页,我想直接转到viewcontroller,它是2。tabbarcontroller。但是当我这样做时,我看不到tabbar控制器。有什么问题吗?你有什么建议 self.tabBarController = [[UITabBarController alloc] init]; UIImage* tabBarBack

我的tabbarcontroller有问题。我正在使用故事板,并且在tabbarcontroller和viewcontroller之间使用导航控制器。我还有登录页。从登录页,我想直接转到viewcontroller,它是2。tabbarcontroller。但是当我这样做时,我看不到tabbar控制器。有什么问题吗?你有什么建议

  self.tabBarController = [[UITabBarController alloc] init];
    UIImage* tabBarBackground = [UIImage imageNamed:@"Tab_bar_bkg.png"];
    [[UITabBar appearance] setBackgroundImage:tabBarBackground];

    [[UITabBarItem appearance] setTitleTextAttributes:
     [NSDictionary dictionaryWithObjectsAndKeys:
      [UIColor whiteColor], UITextAttributeTextColor,
      [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset,
      [UIFont fontWithName:@"Helvetica" size:0.0], UITextAttributeFont,
      nil] forState:UIControlStateNormal];

提前感谢您。

我终于找到了解决方案。问题不是使用这个:

 [self dismissModalViewControllerAnimated:YES];
我用过这个:

[self presentModalViewController:controller animated:YES]

非常感谢您的帮助…

登录页面的序列应该转到故事板中的选项卡栏控制器。你是这样安排的吗?您在登录屏幕和下一屏幕之间使用的是哪种序列(模式、推送、其他?)?我也尝试过。我的意思是使用推送序列转到tabbar。但它不起作用?对于登录屏幕,我没有使用和segue…我只是用代码调用。但是我的问题我不知道这样一个问题,当我登录时我可以看到tabbar。但是当我在没有登录的情况下调用我想要的页面时,我在那里看不到我的tabbar控制器???推送序列只能与导航控制器一起使用。是导航控制器中的登录屏幕。如果没有,请使用模式segue。我在导航控制器中使用了带push segue的登录。。我也试着用modal segue登录(不带导航控制器),但我没用?:/我的tabbarcontroller已连接到导航控制器中的viewcontroller。我不知道这是否可以作为帮助我的提示?