从标签栏的翻转侧返回时,标签栏不加载。 iOS版

时间:2013-05-27 23:01:03

标签: iphone ios xcode uitabbarcontroller uitabbar

所以我有一个带有三个标签的标签栏应用程序。在第二个选项卡中,我有一个按钮,用于加载另一个视图,其中两个文本字段将其值传递到原始选项卡视图中的两个标签。当我单击按钮,输入我的值,然后单击设置按钮返回到原始视图,标签已更改,但标签栏未加载。从其他视图切换后如何加载标签栏?

按下原始标签栏视图中按钮的代码

TeamNameViewController *fvc = [self.storyboard instantiateViewControllerWithIdentifier:@"99"];

fvc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentViewController:fvc animated:YES completion:nil];

返回标签栏的代码

 SecondViewController *tempView = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondViewControllerSB"];

tempView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentViewController:tempView animated:YES completion:nil];

1 个答案:

答案 0 :(得分:0)

简短的回答是:你没有。

presentViewCntroller:animated:completion以模态方式显示目标视图控制器。其他视图仍然存在,您不需要再次实例化它们,您需要关闭模态视图控制器。

你需要在呈现视图控制器(即调用presentViewController的视图控制器:动画:完成负责)上调用dismissViewController:animated:completion。

相关问题