我正在正确地viewController
从 A 推 B 使用navigationController
. 但是,我想uiwebview
从viewController
B 完成加载一次,而不是立即执行。我首先尝试初始化 B 并在加载结束时推送 A 但没有成功,控制器没有被查看。如何做呢?谢谢你。
从控制器A,
self.controllerB = [[BViewController alloc] initWithNibName:@"BViewController" bundle:nil anUser:self.idUser aLang:self.lang];
//[[self navigationController] pushViewController:controllerB animated:NO]; working if pushed directly here
[self.controllerB view];
然后,controllerB 被初始化、viewDidLoad
触发,当 时webviewDidFinishLoad
,B 必须现在被推或在前面查看。
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
{
AViewController *theInstance = [[AViewController alloc] init];
[theInstance pushBcontroller]; }
上AViewController
,
-(void)pushBcontroller{
[[self navigationController] pushViewController:self.controllerB animated:NO];
}
不工作...