问题
I use new API for requesting of access for an assets library of a user:
PHPhotoLibrary.requestAuthorization(for: .readWrite) {
[weak self] (status:PHAuthorizationStatus) in
print("called");
}
iOS displays alert with access levels:
If the user selects Select Photos...
, iOS will show a picker:
If user swipes down on a title of the picker, the photos library will not call the handler block.
Implementation of the photoLibraryDidChange
func photoLibraryDidChange(_ changeInstance: (PHChange)) {
guard let fetchResult = self.fetchResult else {
return
}
if changeInstance.changeDetails(for: fetchResult) != nil {
DispatchQueue.main.async {
self.delegate?.photosLibraryChanged(self)
}
}
}
Does someone faced with this situation? And how I can fix it?
Example: https://github.com/K-Be/NewInPhotoKitInIOS14
来源:https://stackoverflow.com/questions/65351479/phphotolibrary-requestauthorizationfor-handler-does-not-calls-handler-block