Fix deadlock when loading assets after requesting authorization
This commit is contained in:
parent
12bcf52764
commit
705fbbe343
|
@ -143,8 +143,10 @@ class AssetCollectionViewController: UIViewController, UICollectionViewDelegate
|
|||
switch PHPhotoLibrary.authorizationStatus(for: .readWrite) {
|
||||
case .notDetermined:
|
||||
PHPhotoLibrary.requestAuthorization(for: .readWrite) { (_) in
|
||||
DispatchQueue.main.async {
|
||||
self.loadAssets()
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
case .restricted, .denied:
|
||||
|
|
Loading…
Reference in New Issue