ios - UIImagePickerController is crashing on iOS5 but working fine on iOS6+ -
my following code working fine on ios6+ crashing on ios5 every 3rd time, yes working fine 2 time , crashing on 3rd. not doing fancy tapping same button again , again. button call method contains following line of code.
self.imagepopover = nil; uiimagepickercontroller* imagepicker = [[uiimagepickercontroller alloc] init]; imagepicker.delegate = self; imagepicker.sourcetype = uiimagepickercontrollersourcetypesavedphotosalbum; uipopovercontroller *imagepop = [[uipopovercontroller alloc] initwithcontentviewcontroller:imagepicker]; [imagepop presentpopoverfromrect:self.profileimagebutton.frame inview:self.profileimagebutton permittedarrowdirections:uipopoverarrowdirectionany animated:yes]; self.imagepopover = imagepop;
and , in
- (void)imagepickercontrollerdidcancel:(uiimagepickercontroller *)picker { picker.delegate = nil; [self.imagepopover dismisspopoveranimated:yes]; }
and following says in consol crash
*** -[pluisavedphotosalbumviewcontroller hash]: message sent deallocated instance 0x6dbd390
some time pluisavedphotosalbumviewcontroller
replaced uiimagepickercontroller
formate of log same something
hash]: message sent deallocated instance something
. , crashes on following line first piece of code
[imagepop presentpopoverfromrect:self.profileimagebutton.frame inview:self.profileimagebutton permittedarrowdirections:uipopoverarrowdirectionany animated:yes];
Comments
Post a Comment