【发布时间】:2013-08-13 04:25:19
【问题描述】:
我有两个视图控制器,FirstViewController 和 FourthViewController。 FirstViewController 是我的初始视图控制器。我向FourthViewController 展示了
UIViewController *fourthController = [self.storyboard instantiateViewControllerWithID:@"Fourth"];
[self presentViewController:fourthController animated:YES completion:nil];
然后,在FourthViewController 的.m 中,我想更改FirstViewController 中UILabel 的文本。所以我用
UIViewController *firstController = [self.storyboard instantiateViewControllerWithID:@"First"];
firstController.mainLab.text = [NSMutableString stringWithFormat:@"New Text"];
但是,在我使用之后
[self dismissViewControllerAnimated:YES completion:nil];
我发现我的 mainLab 的文本没有更新。有谁知道为什么?
【问题讨论】:
标签: ios objective-c cocoa-touch uiviewcontroller uilabel