Swift 单选相册及拍照简单封装 带图片裁剪
查看次数:3815
下载次数:479
上传时间:2018-02-08
大小:266 B
使用方法:
1.定义属性
let radioAlbum = HWRadioAlbum()
2.调用方法(显示提示框)
override func touchesBegan(_ touches: Set, with event: UIEvent?) {
radioAlbum.showPromptBox()
}
3.实现闭包回调接收图片
override func viewDidLoad() {
super.viewDidLoad()
weak var weakSelf = self // 弱引用
radioAlbum.selectedImageBlock = { (image)in // 选择图片的回调
weakSelf!.imageView.image = image
}
}
收藏