I am using the below code to select image from Camera or Photo Library. In iOS 8, it is picking image nicely. But in iOS 9 . picker view displayed but not selecting image. Not even go back to the controller. Tap on picture does nothing. What am i doing wrong.
- (void)showImgaePickerViewForSourceType:(UIImagePickerControllerSourceType)sourceType
{
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
imagePickerController.sourceType = sourceType;
imagePickerController.allowsEditing = YES;
imagePickerController.delegate = self;
self.imgPickerController = imagePickerController;
if (IS_IPAD) {
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:self.imgPickerController];
[popover presentPopoverFromRect:CGRectMake(self.view.frame.size.width/2-200, self.view.frame.size.height/2 - 300, 400, 400) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
self.popOver = popover;
}];
}else{
[self presentViewController:self.imgPickerController animated:YES completion:NULL];
}
}