ios - UIImagePickerController didFinishPickingMediaWithInfo sometime is not called -


hi im making altered reality app. main controller derived uiimagepickercontroller. here how create it:

- (void)viewwillappear:(bool)animated {     [super viewwillappear:animated];     if (!self.overlaycontroller) {         if ([uiimagepickercontroller issourcetypeavailable:uiimagepickercontrollersourcetypecamera]) {             self.sourcetype = uiimagepickercontrollersourcetypecamera;             self.cameracapturemode = uiimagepickercontrollercameracapturemodephoto;             self.cameradevice = uiimagepickercontrollercameradevicerear;              self.showscameracontrols = false;             self.allowsediting = false;              self.overlaycontroller = [[[controlsviewcontroller alloc] initwithnibname:@"controlsviewcontroller" bundle:[nsbundle mainbundle] picker:self] autorelease];             [self.view addsubview:self.overlaycontroller.view]; // need add subview otherwise mouse events captured uiimagepickercontroller             self.overlaycontroller.view.frame = cgrectmake(0,0, self.view.frame.size.width, self.view.frame.size.height);         }     }     [cameracontrols setcamera:self]; } 

basically controller exists through whole lifecycle of app. when take photo code below of time works fine sometime didfinishpickingmediawithinfo isn't called. usual behavior see camera focus starts adjust blur-in/out , stabilizes didfinishpickingmediawithinfo never called. looks if camera goes kind of calibration mode may not fire event. have solution? hope there maybe kind of callback (like error processing im missing). can hear camera shutters simulated sound interrupted when camera goes weird calibration mode.

//self.camerapicker points instance of main controller created earlier  -(void) setcamera:(uiimagepickercontroller *)picker {     self.camerapicker = picker;     picker.delegate = self; }  -(void) takepicture {     [self.camerapicker takepicture]; } -(void) imagepickercontroller:(uiimagepickercontroller *)picker didfinishpickingmediawithinfo:(nsdictionary *)info {     nslog(@"picture ready"); } 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -