apptut / Photopicker
Licence: apache-2.0
Swift3.0基于PhotoKit高仿iOS微信图片选择器(photo picker like WeChat by swift)
Stars: ✭ 105
Programming Languages
swift
15916 projects
Labels
Projects that are alternatives of or similar to Photopicker
Weapp Qrcode Base64
微信小程序生成二维码的插件,基于base64编码输出二维码,不依赖canvas
Stars: ✭ 100 (-4.76%)
Mutual labels: wechat
Gxgk Wechat Server
校园微信公众号,使用 Python、Flask、Redis、MySQL、Celery [DEPRECATED]
Stars: ✭ 1,325 (+1161.9%)
Mutual labels: wechat
Wechat4u
微信 wechat web 网页版接口的 JavaScript 实现,兼容Node和浏览器,微信机器人
Stars: ✭ 1,431 (+1262.86%)
Mutual labels: wechat
Wechat Go
go version wechat web api and message framework for building wechat robot
Stars: ✭ 1,381 (+1215.24%)
Mutual labels: wechat
Flutter wechat camera picker
A camera picker in WeChat style.
Stars: ✭ 95 (-9.52%)
Mutual labels: wechat
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
配置文件。
注意
- 当前版本不支持视频,如有需求请反馈
- 调用相册和拍照需要在info.plist文件中添加如下两个key, 否则程序会崩溃:
Privacy - Photo Library Usage Description
Privacy - Camera Usage Description
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].