【文件属性】:
文件名称:ios-Swift 单选相册及拍照简单封装 带图片裁剪.zip
文件大小:266KB
文件格式:ZIP
更新时间:2022-07-31 13:21:21
系统功能
使用方法:
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
}
}