objective c - UIImagePickerController Layout Issue - iOS -


i using uipickerviewcontroller capture photo, getting layout below:

enter image description here

as can see in image - switch camera button not showing properly.

below code

    uiimagepickercontroller *imagepickercontroller = [[uiimagepickercontroller alloc] init];     imagepickercontroller.modalpresentationstyle = uimodalpresentationovercurrentcontext;     imagepickercontroller.mediatypes = @[(nsstring *)kuttypeimage];     imagepickercontroller.sourcetype = type;     imagepickercontroller.delegate = self;     imagepickercontroller.navigationbarhidden = yes;     imagepickercontroller.cameradevice = uiimagepickercontrollercameradevicefront;     self.imagepickercontroller = imagepickercontroller;     [self presentviewcontroller:self.imagepickercontroller animated:yes completion:nil]; 

i not sure doing wrong, please suggest

thanks

i had issue in ios 7 status bar not being hidden. here's need do: first set view controller-based status bar appearance no, add code before presenting view controller:

[[uiapplication sharedapplication] setstatusbarhidden:yes]; 

then add 2 delegate methods:

- (void)imagepickercontroller:(uiimagepickercontroller *)picker didfinishpickingmediawithinfo:(nsdictionary *)info {     [[uiapplication sharedapplication] setstatusbarhidden:no]; }  - (void)imagepickercontrollerdidcancel:(uiimagepickercontroller *)picker {     [[uiapplication sharedapplication] setstatusbarhidden:no]; } 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -