我的项目中有两个视图控制器ViewController
,SettingsView
. ViewController's
在这里,当我单击SettingsView's
后退按钮时,我正在尝试更新标签。NSLog
工作正常,但标签没有更新......请帮助我......
设置视图.m
-(IBAction)backToMain:(id) sender {
//calling update function from ViewController
ViewController * vc = [[ViewController alloc]init];
[vc updateLabel];
[vc release];
//close the SettingsView
[self dismissModalViewControllerAnimated:YES];
}
视图控制器.m
- (void)updateLabel
{
NSLog(@"Iam inside updateLabel");
self.myLabel.text = @"test";
}
你能告诉我我的代码有什么问题吗?谢谢!