【发布时间】:2014-03-08 22:05:32
【问题描述】:
我正在尝试通过按下不同视图控制器 2 上的按钮来更新视图控制器 1 上的标签。我在视图控制器 2 中有此 IBAction:
- (IBAction)done:(id)sender {
DropPinVC * vc = [[DropPinVC alloc]init];
NSString *updatedLabel = [[NSUserDefaults standardUserDefaults] stringForKey:@"Type Location"];
NSLog(@"Updated Label = %@", updatedLabel);
vc.TypeLabel.text = updatedLabel;
[self closeScreen];
}
但是,视图控制器 1 上的标签不会更新。有人知道这个问题的解决方案吗?
【问题讨论】:
标签: ios uiviewcontroller label nsuserdefaults ibaction