Latest 0.8.0
Homepage https://github.com/RainManGO/ZYImagePickerAndBrower
License MIT
Platforms ios 8.0
Authors

ZYImagePickerAndBrower 是一个模仿微信相册多选照片的一个控件。注意了微信相册的一些细节,比如序号,最大选择之后照片变灰,浏览缩略图等等。

image
image

demo移步

Requirements

ZYImagePickerAndBrower 支持iOS8+

  • Photo.framework
  • UIKit.framework

Adding ZYImagePickerAndBrower to your project

CocoaPods

  1. Add a pod entry for ZYImagePickerAndBrower to your Podfile pod 'ZYImagePickerAndBrower', '~> 0.8.0'
  2. Install the pod(s) by running pod install.

pod demo地址

功能支持

==============

  • 相册序号选择: 微信样式多选照片
  • 预览序号选择: 预览时可以序号选择
  • 预览缩略图和大图联动: 联动样式仿微信
  • 网络图片浏览: 有时需要处理服务器返回网络图片
  • 快速布局UI: 只需集成 ZYImagePickerLayoutView 可自动将照片布局

使用

设置主题颜色

ZYPhotoAlbumSkinColor = UIColor.orange

选照片

 let photoAlbumVC = ZYPhotoNavigationViewController(photoAlbumDelegate: self, photoAlbumType: .selectPhoto)    //初始化需要设置代理对象
        photoAlbumVC.maxSelectCount = 9   //最大可选择张数
        self.navigationController?.present(photoAlbumVC, animated: true, completion: nil)

ZYPhotoAlbumProtocol回调

 func photoAlbum(selectPhotos: [ZYPhotoModel]) {
        //选择的照片之后去layoutView显示
        let imageArray = selectPhotos.map { (model) -> UIImage in
            return model.thumbnailImage!
        }
        imagePickerView.dataSource = imageArray
        imagePickerView.numberOfLine = 4
        imagePickerView.reloadView()
        imagePickerView.addCallBack = { () in
            self.goPickerController()
        }
 }

更新

==============

  • 0.8.0: 修复无法返回相册问题

  • 0.7.0: 修复预览之后,导航栏不见了问题。预览最好用present方式。

License

Latest podspec

{
    "name": "ZYImagePickerAndBrower",
    "version": "0.8.0",
    "summary": "u65b0u7248u5faeu4fe1u76f8u518cu9009u62e9u5e26u5e8fu53f7u548cu7f29u7565u56fe.",
    "swift_version": "4.1",
    "description": "u65b0u7248u5faeu4fe1u76f8u518cu9009u62e9u5e26u5e8fu53f7u548cu7f29u7565u56fe,u548cu5faeu4fe1u7ec6u8282u5b8cu5168u76f8u4f3cu3002",
    "homepage": "https://github.com/RainManGO/ZYImagePickerAndBrower",
    "license": "MIT",
    "authors": {
        "ZY": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/RainManGO/ZYImagePickerAndBrower.git",
        "tag": "0.8.0"
    },
    "source_files": "ZYImagePickerAndBrower/ZYImagePickerAndBrowerKit/**/*.swift",
    "resources": "ZYImagePickerAndBrower/ZYImagePickerAndBrowerKit/Resource/*.png"
}

Pin It on Pinterest

Share This