Reputation: 1250
navigation bar transparent while picking a video from image picker controller
I'm trying to pick a video using image picker controller. while picking a video, previous screen title is visible or navigation bar is transparent. This is only happening on iPad, not on iPhone. My code is as given,
imagePicker.sourceType = .savedPhotosAlbum
imagePicker.mediaTypes = [kUTTypeMovie as String]
self.present(self.imagePicker, animated: true, completion: nil)
Upvotes: 1
Views: 515
Reputation: 621
I think there is value in UINavigationBar
's Appearance
you can remove it by putting this line before you present
your UIPickerView
UINavigationBar.appearance().barTintColor = nil
if you want to put the value back after user picked image/video you can do it in UIImagePickerControllerDelegate
function imagePickerController(_:didFinishPickingMediaWithInfo:)
and also in imagePickerControllerDidCancel(_:)
UINavigationBar.appearance().barTintColor = UIColor.red
Upvotes: 1