错误提示:
Warning: Attempt to present on whose view is not in the window hierarchy!
==============================
找到2个相关的问答,但是看的云里雾里,有没有帮忙解答一下:
1.http://stackoverflow.com/questions/26376940/upload-photo-with-uiwebvie...
2.http://stackoverflow.com/questions/25942676/ios-8-sdk-modal-uiwebview-...
已解决,ios8的问题
view切换的时候把方式从 presented 改为 pushed就可以了
加
-(void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion
{
if ( self.presentedViewController)
{
[super dismissViewControllerAnimated:flag completion:completion];
}
}
这段代码可以解决
不过我一开始做了一个UINavigationController控制页面,然后直接presentViewController一个tabBarController在上面 加这段代码也不行。
把presentViewController改成navigationController pushViewController就可以了。