iphone - UIImagePickerController Camera Reappears after Being Dismissed - Memory -
after setting uiimagepickercontroller camera try dismiss following code :
- (void)donebuttonclick: (id)sender { [self dismissviewcontrolleranimated : no completion no]; }
however view reloads , view appear called again. think app receiving memory warning , pulling down non-visible views.
i want reload previous view solution. previous view storyboard, trying following :
- (void)donebuttonclick:(id)sender { //[self dismissviewcontrolleranimated:no completion:no]; uistoryboard * storyboard = [uistoryboard storyboardwithname:@"mainstoryboard" bundle:nil]; bsproomdefaultviewcontroller * myvc = (bsproomdefaultviewcontroller *)[storyboard instantiateviewcontrollerwithidentifier:@"default"]; [self presentviewcontroller:myvc animated:yes completion:no]; }
however getting error "attempt present on view not in window hierarchy !"
can suggest how can reload previous view ?
instead of using [self dismissviewcontrolleranimated : no completion no]; use:
[imagepicker dismissviewcontrolleranimated:no completion:nil];
with imagepicker being instance of uiimagepickercontroller.
Comments
Post a Comment