Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何让用户看到前置摄像头,但阻止他们在 iPhone 4/4s 和/或 iPod Touch 4 上拍照、录像或切换到后置摄像头?
cameraPicker = [[UIImagePickerController alloc] init]; .... cameraPicker.showsCameraControls = NO; cameraPicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
您可以使用 AVFoundation 框架打开相机。
试试这个示例代码https://developer.apple.com/library/ios/#samplecode/AVCam/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010112。