Select button is hidden in UIImagePicker bar coming form a WKWebView

148 Views Asked by At

I have a WKWebview page in my app which selects an image to upload it so I have NO CONTROL over opening the UIImagePicker It happens natively but the "DONE" button which I can click is not shown in iPad ios 14.7.1 but it's actually clickable!!

This is how UIImagePicker shown natively

The red area is actually clickable!

I tried changing tint color globally but only the back arrow has changed the button is still hidden or something!

1

There are 1 best solutions below

3
On

Use this:

extension UIImagePickerController {
     open override func viewDidLoad() {
         super.viewDidLoad()
         self.modalPresentationStyle = UIModalPresentationStyle.custom
     }
}

Try this:

 extension UIImagePickerController {
        open override func viewWillLayoutSubviews() {
            super.viewWillLayoutSubviews()
            self.navigationBar.topItem?.rightBarButtonItem?.tintColor = UIColor.black 
            self.navigationBar.topItem?.rightBarButtonItem?.isEnabled = true
        }
    }