Sunday, 15 March 2015

IOS camera stopped working -



IOS camera stopped working -

for reason getting null image in ios application whether take photo or grap photo gallery. working , returning photos view controller , of sudden stopped working though did not create changes program. caused memory problem? if take photo through program, set photo out gallery not homecoming view controller. ideas on problem might be? below photo logic:

- (ibaction)getphoto:(id)sender { uiimagepickercontroller *imagepicker = [[uiimagepickercontroller alloc] init]; imagepicker.sourcetype = uiimagepickercontrollersourcetypephotolibrary; [imagepicker setdelegate:self]; [self presentviewcontroller:imagepicker animated:yes completion:nil]; }

and below homecoming logic after photo selected , returns null image:

- (void) imagepickercontroller:(uiimagepickercontroller *)picker didfinishpickingmediawithinfo:(nsdictionary *)info { uiimage *image = (uiimage *) [info objectforkey: uiimagepickercontrolleroriginalimage]; self.photoimage.image = image; self.uploadimage = image; [self dismissviewcontrolleranimated:yes completion:nil]; }

sorry flase alarm noticed image went way in xib file. 1 time restored worked. don't understand why ios doesn't observe missing image when trying update it.

ios camera uiimagepickercontroller

No comments:

Post a Comment