//复制文字
@objc func copyAction() {
UIPasteboard.general.string = "文案复制成功"
JJHUDManage.successShow("文案复制成功")
}
//保存图片至相册
@objc func saveAction() {
UIImageWriteToSavedPhotosAlbum(iconImage.image, self, #selector(saveImage(image:didFinishSavingWithError:contextInfo:)), nil)
}
@objc private func saveImage(image: UIImage, didFinishSavingWithError error: NSError?, contextInfo: AnyObject) {
if error != nil{
JJHUDManage.errorShow("保存失败")
}else{
JJHUDManage.successShow("保存成功")
}
}
网友评论