I am using UIImagePickerController
in my app and it crashes whenever I click on cancel for 2nd time and shows following crash log :
Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller: should have parent view controller:(null) but actual parent is:'
Dismissing code :
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[self dismissViewControllerAnimated:YES completion:nil];
}
The same code is working fine in other app but when I copied the code into new project the crash is occurring repeatedly. Its happening on iOS 8.3 & 7.1, not tested on other versions. Any help would be much appreciable.