Camera controls not showing on iOS 7

I used Image Picker Controller to call the device’s camera. The code below works fine for iOS 7. But when I use the same code on iOS 7 to start the camera, I can’t see the “Use” and “Cancel” buttons.

- (void)getCameraPicture { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.allowsEditing = NO; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto; [self presentViewController:picker animated:YES completion:NULL]; 

}

Any help is appreciated. Please find the screenshot to see the problem

Update:

When I try to run this code in an example application, it works fine (the example application contains one view). But when I put it in my project, the buttons do not appear.

+2
source share
2 answers

in the code should be:

  ... picker.showsCameraControls = YES; 
+2
source

You checked this @property (nonatomic) BOOL showsCameraControls in UIImagePickerController.

+1
source

Source: https://habr.com/ru/post/1434430/


All Articles