我有一个这样的代码来呈现一个TOWebViewController,其中包含我的公司网页的网址。
TOWebViewController *webViewController = [[TOWebViewController alloc] initWithURL:url];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:webViewController];
[[[[UIApplication sharedApplication] delegate] window] setRootViewController:navigationController];打开后,我如何返回到以前的视图或关闭根视图控制器,因为我的导航栏只显示灰色条。
谢谢
发布于 2016-01-08 11:52:23
使用[self presentViewController:imagePickerController animated:YES completion:nil]; instead.And不要使用根视图控制器!
发布于 2016-01-08 12:51:23
你需要创建一个自定义的back button @selector,并在其中设置[[[[UIApplication sharedApplication] delegate] window] setRootViewController:previousViewController];,尽管你需要引用之前的viewController,但是我不建议使用这个approach.As @lumialxk说,使用这个代替[self presentViewController:imagePickerController animated:YES completion:nil];
https://stackoverflow.com/questions/34668831
复制相似问题