最近我开始使用故事板,我遇到了以下情况:我想从AppDelegate设置UILabel的文本。所以我创造了我的ViewController故事板问题
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard"
bundle: nil];
ViewController *controller = (ViewController*)[mainStoryboard
instantiateViewControllerWithIdentifier: @"mainViewController"];
myViewController = controller;
[window addSubview:myViewController.view];
[window makeKeyAndVisible];
的实例,并称之为从委托
- (void) updateParameterLabel:(NSString *)parameter {
NSLog(@"URL-2: %@", parameter);
parameterLabel.text = parameter;
}
以下方法,但参数未在UI中显示。
再想一想,这是一种strage的:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
NSLog(@"View did Appear");
}
“视图并显示” 登录两次......
任何提示?
问候, 萨沙
好的,这就是我实际上实现它的方式,但它仍然不起作用。 – 2012-01-30 07:59:42