Latest 1.0.7
Homepage https://github.com/dzyding/ImagePicker
License MIT
Platforms ios 10.0
Dependencies SnapKit

导入方式

pod 'DzyImagePicker'

初始化方式

正方形:

// 默认正方形、需要裁剪  所以可以不进行参数的赋值
let vc = DzyImagePickerVC()
vc.delegate = self
let navi = UINavigationController(rootViewController: vc)
present(navi, animated: true, completion: nil)

gif

长方形:

let vc = DzyImagePickerVC()
// 0.66 = 宽 / 高
vc.cropScale = 0.66
vc.delegate = self
let navi = UINavigationController(rootViewController: vc)
present(navi, animated: true, completion: nil)

gif

原图:

let vc = DzyImagePickerVC()
vc.delegate = self
vc.ifCrop = false
let navi = UINavigationController(rootViewController: vc)
present(navi, animated: true, completion: nil)

获取结果

func imagePicker(_ picker: DzyImagePickerVC?, getCropImage image: UIImage) {
    imgView.image = image
}

func imagePicker(_ picker: DzyImagePickerVC?, getOriginImage image: UIImage) {
    imgView.image = image
}

Latest podspec

{
    "name": "DzyImagePicker",
    "version": "1.0.7",
    "summary": "image picker",
    "description": "u4effu5faeu4fe1u5236u4f5cu7684u56feu7247u7f16u8f91u63a7u4ef6uff0cu6b22u8fceu5404u4f4du5927u4f6cu63d0 pr",
    "homepage": "https://github.com/dzyding/ImagePicker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "u7070s",
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/dzyding/ImagePicker.git",
        "tag": "1.0.7"
    },
    "source_files": "Source/*.swift",
    "resources": "Resources/*.*",
    "swift_versions": "5.0",
    "dependencies": {
        "SnapKit": [
            "~> 4.2.0"
        ]
    }
}

Pin It on Pinterest

Share This