App is crashing when I use UIImagePicker
on iPhone, but only on iOS 7.
I use the following code lines
picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
if( [UIImagePickerController isCameraDeviceAvailable:UIImagePickerControllerCameraDeviceFront] || [UIImagePickerController isCameraDeviceAvailable:UIImagePickerControllerCameraDeviceRear])
{
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
} else {
//[self showAlertViewWithTitle:@"Sorry" message:@"Your Device Don't Have Camera"];
}
[self presentViewController:picker animated:YES completion:nil];
}
The app is running on iOS 6, not in iOS 7. I am new on this site, please help.