3

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!

Popeye
  • 11,839
  • 9
  • 58
  • 91
user3686588
  • 375
  • 1
  • 4
  • 6

1 Answers1

2

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

Community
  • 1
  • 1
jcesarmobile
  • 51,328
  • 11
  • 132
  • 176