Search code examples
iosiphonecordovauser-interfacefilepicker

Cordova: White bar at bottom when I return from file chooser/Picker


File picker opens and closes normally but after it is closed, it brings a white bar at bottom of the screen and each time file picker is opened and closed, it grows to above that shrinks height of the screen.White area at the bottom marked

[File picker[2]


Solution

  • I found the answer after 2days of research. Replace 'viewBounds' to '[self.view bounds]' instead of '[self.webView bounds]' in the viewWillAppear in MainViewController.m

    if your PhoneGap/Cordova app displays other native views (like the File picker, camera capture dialog, Picture album) and returns to this view. The fix was to initialize 'view Bounds' instead of 'webView bounds'.