0

After I cancel the image picker, the viewWillAppear gets called but the viewDidAppear does not get called. And subsequent loading of that view by going up and back down the stack does not help it.

Only if I switch to another Tab and then switch back, do I get the viewdidappear calling. I use this code to cancel the image picker (iOS 6)

-(void) imagePickerControllerDidCancel:(UIImagePickerController *)picker{
[self dismissViewControllerAnimated:NO completion:^{
        self.imgScrollView.hidden=NO;
    }];
}
Mehdi
  • 772
  • 7
  • 16

1 Answers1

0

You are trying to dismiss the viewController which presented the imagePickerController, try using picker instead of self something like this:

-(void) imagePickerControllerDidCancel:(UIImagePickerController*)picker
{
    [picker dismissViewControllerAnimated:NO completion:
    ^{
          self.imgScrollView.hidden=NO;
    }];
}
Khaled.K
  • 5,828
  • 1
  • 33
  • 51
Mohd Iftekhar Qurashi
  • 2,385
  • 3
  • 32
  • 44