ios - 在 UIImagePickerController 中启用相机胶卷缩略图

标签 ios iphone swift uiimagepickercontroller camera-overlay

有没有办法在 UIImagePickerController 中显示相机胶卷缩略图(下面用红色标记)? 右图显示了带有相机源的默认 UIImagePickerController 的外观。

enter image description here enter image description here

这就是我展示相机的方式:

func openCamera() {
    if(UIImagePickerController .isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera)) {
        picker!.sourceType = UIImagePickerControllerSourceType.Camera
        picker!.showsCameraControls = true
        picker!.cameraDevice = UIImagePickerControllerCameraDevice.Front
        self.presentViewController(picker!, animated: true, completion: nil)
    } else {
        NSLog("No camera")
        openGallary()
    }
}

This post声称这在 2010 年是不可能的,但我希望有新的时代。

最佳答案

我最终使用了 DBCamera ,这让您可以非常轻松地自定义整个相机 View 。

我确实相信 Lyndsey Scott 是对的,只需将自定义 subview 添加到默认相机 View 即可完成。

关于ios - 在 UIImagePickerController 中启用相机胶卷缩略图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27769010/

相关文章:

从 OS X APP 检测 iOS 应用程序

iphone - UITableView 无法一直滚动到底部

swift - 移除 Cell 内的 subview

ios - 保留/释放错误

ios - 来自外部脚踏开关的 Cordova 应用程序按键事件在 iOS 上不起作用

ios - 可达性和国际漫游

Swift 协议(protocol)作为类的通用参数

ios - 在 iOS 8 中动态调整 inputAccessoryView 的大小

php - 空间 NSURL 连接

iOS/swift 4 : How to copy a folder containing several folders containing files without removing the files and folders existing destination?