import Photos
switch PHPhotoLibrary.authorizationStatus() {
case .authorized:
print(".authorized")
self.fetchAll()
case .denied:
print(".denied")
permissionView.isHidden = false
case .notDetermined:
PHPhotoLibrary.requestAuthorization({
switch $0 {
case .authorized:
print("notDetermined .requestAuthorization")
DispatchQueue.main.async {
self.fetchAll()
}
case .denied:
print("notDetermined .denied")
DispatchQueue.main.async {
self.permissionView.isHidden = false
}
default: break
}
})
default: break
}
'개발 > IOS' 카테고리의 다른 글
Swift - Alamofire - REST API (0) | 2022.01.24 |
---|---|
키보드 올라올때 화면 대응하기 (0) | 2022.01.24 |
ios swift get app version (0) | 2020.11.10 |
[IOS] Swift 서버 이미지 업로드 (0) | 2020.04.19 |