Source code:
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.modalPresentationStyle = UIModalPresentationCurrentContext;
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePickerController.delegate = self;
imagePickerController.showsCameraControls = YES;
imagePickerController.allowsEditing = YES;
self.imagePickerController = imagePickerController;
[self presentViewController:self.imagePickerController animated:YES completion:nil];
And then get console error when running in iPad on iOS 8.1 or 8.3 as follow:
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
Jun 12 10:58:15 iPad TwinsOrNot[180] <Error>: CGAffineTransformInvert: singular matrix.
Jun 12 10:58:15 iPad TwinsOrNot[180] <Error>: CGAffineTransformInvert: singular matrix.
Jun 12 10:58:15 iPad TwinsOrNot[180] <Error>: CGAffineTransformInvert: singular matrix.