CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

YVImagePickerController 1.1.1

YVImagePickerController 1.1.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2018
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Yvent.



  • By
  • Yvent

YVImagePickerController

iOS - 支持单选,多选,视频和图片,多图合成幻灯片,视频剪辑

image

Requirements

iOS 9.0+ 
Xcode 8.0+
Swift 3.0+

Step1

pod 'YVImagePickerController' ,'~> 1.0.6'

Step2
在plist文件中加入

 <key>NSPhotoLibraryUsageDescription</key>
   <string>App需要您的同意,才能访问相册</string>

Step3

 import Photos

遵守协议 YVImagePickerControllerDelegate
初始化

let pickerVC = YVImagePickerController()
self.present(pickerVC, animated: true, completion: nil)

配置

yvmaxSelected 多选时最大张数
yvcolumns 每行列数
topViewColor 导航栏背景色
yvmediaType  媒体类型:照片或视频 
yvIsMultiselect 是否多选,默认单选 

实现代理方法

 func yvimagePickerController(_ picker: YVImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { }
    
 func yvimagePickerControllerDidCancel(_ picker: YVImagePickerController) {}

我的博客http://www.jianshu.com/p/ae85bcd5ec73