objective c - changing "cameraDevice" to rear and front (beside UIImagePickerController) -
is there other api provide changing "cameradevice" rear , front? beside "uiimagepickercontroller" 's cameradevice property?
this function allowed me solve problem.
- (avcapturedevice *)frontfacingcamera { nsarray *videodevices = [avcapturedevice deviceswithmediatype:avmediatypevideo]; avcapturedevice *capturedevice = nil; (avcapturedevice *device in videodevices) { if (device.position == avcapturedevicepositionfront) { capturedevice = device; break; } } return capturedevice; }
Comments
Post a Comment