Commit 824b478e authored by Steven杜宇's avatar Steven杜宇

// 相册权限提示

parent 59c46a9b
......@@ -383,7 +383,10 @@ extension YHCertificateUploadSheetView: (UIImagePickerControllerDelegate & UINav
}
func takePhoto() {
guard getPhotoLibraryAuthorization() else { return }
guard getPhotoLibraryAuthorization() else {
YHHUD.flash(message: "请打开相册权限")
return
}
if UIImagePickerController.isSourceTypeAvailable(.camera){
//创建图片控制器
let imagePicker = UIImagePickerController()
......@@ -401,7 +404,10 @@ extension YHCertificateUploadSheetView: (UIImagePickerControllerDelegate & UINav
}
func selectPhoto() {
guard getPhotoLibraryAuthorization() else { return }
guard getPhotoLibraryAuthorization() else {
YHHUD.flash(message: "请打开相册权限")
return
}
if UIImagePickerController.isSourceTypeAvailable(.photoLibrary){
let imagePicker = UIImagePickerController()
imagePicker.delegate = self
......
......@@ -165,7 +165,10 @@ class YHImagePickerView: UIView {
}
@objc func takePhoto() {
guard getPhotoLibraryAuthorization() else { return }
guard getPhotoLibraryAuthorization() else {
YHHUD.flash(message: "请打开相册权限")
return
}
if UIImagePickerController.isSourceTypeAvailable(.camera){
//创建图片控制器
let imagePicker = UIImagePickerController()
......@@ -183,7 +186,10 @@ class YHImagePickerView: UIView {
}
@objc func selectPhoto() {
guard getPhotoLibraryAuthorization() else { return }
guard getPhotoLibraryAuthorization() else {
YHHUD.flash(message: "请打开相册权限")
return
}
if UIImagePickerController.isSourceTypeAvailable(.photoLibrary){
let imagePicker = UIImagePickerController()
imagePicker.delegate = self
......
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