我使用以下代码启动照片库:
if UIImagePickerController.isSourceTypeAvailable(.photoLibrary) {
let imagePicker = UIImagePickerController()
imagePicker.delegate = self
imagePicker.sourceType = .photoLibrary
imagePicker.mediaTypes = [kUTTypeMovie as String, kUTTypeImage as String]
imagePicker.allowsEditing = false
self.present(imagePicker, animated: true, completion: nil)
}
从我的照片库中选择一个视频,而不是被调用的imagePickerController(_:didFinishPickingMediaWithInfo:)
功能,它会转到一个视图,允许我在顶部播放带有视频滑块的视频。然后我按下选择并调用该功能。如何跳过显示允许我播放视频的视图?
答案 0 :(得分:0)
我相信在使用.photoLibrary
作为源类型时,不可能跳过该部分。
您可以在将源类型设为相机时跳过并写下:
imagePicker.showsCameraControls = false
查看此Link了解详情