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

sql - VB.NET Operand type clash: date is incompatible with int error -

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

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -