Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.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/xcode/7.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 点击UItabbarcontroller中作为popViewcontroller工作的选定选项卡_Ios_Xcode_Ipad_Uitabbarcontroller - Fatal编程技术网

Ios 点击UItabbarcontroller中作为popViewcontroller工作的选定选项卡

Ios 点击UItabbarcontroller中作为popViewcontroller工作的选定选项卡,ios,xcode,ipad,uitabbarcontroller,Ios,Xcode,Ipad,Uitabbarcontroller,在我的应用程序中,我将UITabbarcontroller作为模态视图控制器。共有3个选项卡,我为每个选项卡分配了一个UInavigationcontroller。 现在的问题是,如果我点击一个已经选中的选项卡,它将作为UInavigationcontroller的PopViewController激活功能工作 UITabBarController *custom = [[UITabBarController alloc] init]; custom.delegate = self; custo

在我的应用程序中,我将UITabbarcontroller作为模态视图控制器。共有3个选项卡,我为每个选项卡分配了一个UInavigationcontroller。 现在的问题是,如果我点击一个已经选中的选项卡,它将作为UInavigationcontroller的PopViewController激活功能工作

UITabBarController *custom = [[UITabBarController alloc] init];
custom.delegate = self;
custom.tabBar.backgroundImage = [UIImage imageNamed:@"footerbar.png"];
[custom setViewControllers:[NSArray arrayWithObjects:nav, nav1, nav2, nil]];
[[UITabBar appearance] setItemWidth:(self.view.frame.size.width/3)-15];
[[NSUserDefaults standardUserDefaults] setObject:@"yes" forKey:@"loggedIn"];
[self presentViewController:custom animated:NO completion:nil];
我现在真的被困住了。
此处需要建议。

这是UITabBarController的行为,要防止出现这种情况,请查看链接