Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.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 如何通过有条件加载UIViewController的故事板添加UIAbbarItem_Ios_Objective C_Cocoa Touch_Uitabbarcontroller_Uistoryboard - Fatal编程技术网

Ios 如何通过有条件加载UIViewController的故事板添加UIAbbarItem

Ios 如何通过有条件加载UIViewController的故事板添加UIAbbarItem,ios,objective-c,cocoa-touch,uitabbarcontroller,uistoryboard,Ios,Objective C,Cocoa Touch,Uitabbarcontroller,Uistoryboard,我的应用程序有一个UITabBarController作为root用户,我有一个“Profile”选项卡。我使用的是故事板,我希望Profile选项卡加载一个“无会话版本”,其中只显示登录和注册按钮,以及一个“会话”版本,其中有Profile徽章和其他登录用户可以做的事情(编辑帐户、注销等) 我尝试的内容:因此,其他三个选项卡是附在选项卡栏上的UINavigationControllers,我尝试通过故事板将选项卡栏项添加到UITabBarController,但我做不到。我计划将两个配置文件屏

我的应用程序有一个
UITabBarController
作为root用户,我有一个“Profile”选项卡。我使用的是故事板,我希望Profile选项卡加载一个“无会话版本”,其中只显示登录和注册按钮,以及一个“会话”版本,其中有Profile徽章和其他登录用户可以做的事情(编辑帐户、注销等)


我尝试的内容:因此,其他三个选项卡是附在选项卡栏上的
UINavigationControllers
,我尝试通过故事板将选项卡栏项添加到
UITabBarController
,但我做不到。我计划将两个配置文件屏幕放在同一个故事板中,并通过在我的选项卡栏控制器的所有者中实现
didSelectItem

哦,笨蛋。当然,我可以添加一个
UINavigationController
作为Interface Builder中的Profile选项卡,并有条件地在代码中将其根视图控制器设置为会话或无会话屏幕