Upload photo with UIWebView

血红的双手。 提交于 2019-12-02 00:42:27

问题


I would like to upload a photo directly from UIWebView that has a HTML form for file upload. When I click on button I get options to take photo or choose existing. But when I click any of these two options I get

Warning: Attempt to present <UIImagePickerController: 0x15c15e00> on <UINavigationController: 0x155a2660> whose view is not in the window hierarchy!

Could please anyone can explain me these warning...

Thank you in advance!


回答1:


It's a bug on iOS 8, that happens when the webview is presented modally.

The only options right now it not to present the webview modally, you can present it with a navigation controller or switching the rootviewcontroller

Here you can read more about the bug and a proposed solution

iOS 8 SDK: modal UIWebView and camera/image picker



来源:https://stackoverflow.com/questions/26376940/upload-photo-with-uiwebview

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!