ios - UITabBar dissapear when dismiss UIImagePickerController -


in screenshot below, structure of storyboard uitabbarcontroller -> uinavigationcontroller -> uiviewcontroller. in uiviewcontroller, call .camera using uiimagepickercontroller in viewdidload. however, when users hit cancel inside camera, dismiss viewcontroller, , tab bar dissapears!

this codes dismiss:

func imagepickercontrollerdidcancel(picker: uiimagepickercontroller) {     dismissviewcontrolleranimated(true, completion: nil) } 

enter image description here

enter image description here

edit: added calling of uiimagepickercontroller

override func viewdidload()     {          super.viewdidload()           let picker = uiimagepickercontroller()          picker.delegate = self          picker.sourcetype = .camera          presentviewcontroller(picker, animated: true, completion: nil)    } 

try present imagepicker controller 'overcurrentcontext'

imagepicker.modalpresentationstyle = uimodalpresentationstyle.overcurrentcontext 

or set in storyboard in uiviewcontroller, hope can you.

enter image description here


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -