Apptut PhotoPicker Save

Swift3.0基于PhotoKit高仿iOS微信图片选择器(photo picker like WeChat by swift)

Project README

PhotoPicker

高仿iOS微信图片选择器swift版,基于Photokit(photo picker like WeChat by PhotoKit)

支持版本

iOS8.0+
Swift3.0 (current master branch)

使用说明

当前master分支为Swift3.0版本分支,如果想使用Swift 2.0+系列,请切换到Swfit2分支,在需要使用的地方,直接调用以下代码即可:

let picker = PhotoPickerController(type: PageType.RecentAlbum)
picker.imageSelectDelegate = self
picker.modalPresentationStyle = .Popover
        
// max select number
PhotoPickerController.imageMaxSelectedNum = 4
        
self.showViewController(picker, sender: nil)

图片选择器默认打开最近添加相册列表,如果需要打开其他相册,或者首先打开相册列表,请直接设置PageType枚举具体类型即可:

enum PageType{
    case List      // 打开相册列表
    case RecentAlbum // 直接打开最近添加相册
    case AllAlbum // 直接打开所有相册列表
}

更多参数配置选项,请参照PhotoPickerConfig.swift配置文件。

注意

  1. 当前版本不支持视频,如有需求请反馈
  2. 调用相册和拍照需要在info.plist文件中添加如下两个key, 否则程序会崩溃:
Privacy - Photo Library Usage Description
Privacy - Camera Usage Description
Open Source Agenda is not affiliated with "Apptut PhotoPicker" Project. README Source: apptut/PhotoPicker
Stars
107
Open Issues
1
Last Commit
6 years ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating