You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
在后台线程中改变UI布局
DispatchQueue.global().async {
let asset: Any
let mediaType: PHAssetMediaType
let photoAsset: PhotoAsset
switch result {
case .image(let image):
asset = image
mediaType = .image
photoAsset = .init(localImageAsset: .init(image: image))
case .video(let videoURL):
asset = videoURL
mediaType = .video
photoAsset = .init(localVideoAsset: .init(videoURL: videoURL))
}
var canSelect = false
if !picker.canSelectAsset(for: photoAsset, showHUD: true) {
if !didDismiss {
DispatchQueue.main.sync {
cameraController.dismiss(animated: true)
}
}
canSelect = true
}
if self.config.saveSystemAlbum {
self.saveSystemAlbum(
for: asset,
mediaType: mediaType,
location: location
) { [weak self] in
self?.cameraControllerDismiss(canSelect)
}
return
}
self.addedCameraPhotoAsset(
photoAsset
) { [weak self] in
self?.cameraControllerDismiss(canSelect)
}
}
The text was updated successfully, but these errors were encountered: