Commit 464355a9 authored by David黄金龙's avatar David黄金龙

代码同步

parent 5b880bfd
......@@ -156,15 +156,17 @@ extension YHInvatationShareViewController {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存图片到相册
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
YHHUD.flash(message: "保存成功")
}
} else {
DispatchQueue.main.async {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
}
@objc func wxClick() {
// guard let combinedImage = combinedImageFrom(imageView: centerImageView) else { return }
......
......@@ -191,14 +191,16 @@ class YHConsultantQRCodeView: UIView {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存图片到相册
DispatchQueue.main.sync {
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.image(image:didFinishSavingWithError:contextInfo:)), nil)
}
} else {
DispatchQueue.main.async {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
}
@objc func image(image: UIImage,didFinishSavingWithError: NSError?,contextInfo: AnyObject) {
if didFinishSavingWithError != nil {
......
......@@ -101,12 +101,17 @@ private extension YHVisaPayTypeCell {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存UIImage对象到相册
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.image(_:didFinishSavingWithError:contextInfo:)), nil)
}
} else {
DispatchQueue.main.async {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
}
@objc func image(_ image: UIImage, didFinishSavingWithError error: Error?, contextInfo: UnsafeMutableRawPointer?) {
// 保存完成后的处理逻辑
......
......@@ -233,14 +233,16 @@ extension YHFileListViewController {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存图片到相册
DispatchQueue.main.sync {
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.image(image:didFinishSavingWithError:contextInfo:)), nil)
}
} else {
DispatchQueue.main.async {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
}
@objc func image(image: UIImage,didFinishSavingWithError: NSError?,contextInfo: AnyObject) {
......
......@@ -489,14 +489,16 @@ extension YHMyFileListViewController {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存图片到相册
DispatchQueue.main.sync {
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, self, #selector(self.image(image:didFinishSavingWithError:contextInfo:)), nil)
}
} else {
DispatchQueue.main.async {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
}
@objc func image(image: UIImage,didFinishSavingWithError: NSError?,contextInfo: AnyObject) {
if didFinishSavingWithError != nil {
......
......@@ -147,15 +147,17 @@ extension YHResignGuidelinesExampleShareViewController {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存图片到相册
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
YHHUD.flash(message: "保存成功")
}
} else {
DispatchQueue.main.async {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
}
@objc func wxClick() {
YHShareManager.shared.sendLinkContent("香港身份测评专属方案,限时领取!", "银河身份规划专家1V1评估,获取香港身份方案", UIImage(named: "resign_guidelines_example_share_other") ?? UIImage(), link: YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/evaluation?channel=lkhtj-app&customer_id=\(YHLoginManager.shared.userModel?.id ?? "")&scene_id=30")
......
......@@ -254,13 +254,15 @@ private extension YHLongtapPictureSheetView {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存图片到相册
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
DispatchQueue.main.async {
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
YHHUD.flash(message: "保存成功")
}
} else {
DispatchQueue.main.async {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment