You’ll want to take a look at the UIImagePickerController class which is what lets you access the camera functions of your iOS device.
Specifically, you’ll want to use the source type UIImagePickerControllerSourceTypeCamera
(first checking if the device has a camera via isSourceTypeAvailable:
), with media type kUTTypeImage
, present the camera controller via presentViewController
, and you can then either display the default camera controls, or hide them and take a picture by firing off the takePicture
method when the user presses the custom button.
2
solved How to call take picture method in IOS [closed]