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

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -