Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何在selectImageBlock回调里自己控制什么时候dismiss谢谢 #918

Open
StayStar opened this issue Jul 30, 2024 · 5 comments

Comments

@StayStar
Copy link

Issue Description

Description and Steps

Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.

Info

ZLPhotoBrowser version: e.g. 4.5.4
Device: e.g. iPhone 14 Pro
Device version: e.g. iOS 16.0
Xcode version: e.g. Xcode 14.0

Configuration code of ZLPhotoConfiguration

Paste your code here.
     let ps = ZLPhotoPreviewSheet(selectedAssets: assets)
     ps.selectImageBlock = {models, isOriginal in
         // 写一些压缩图片视频的逻辑,等压缩完以后再将ps dismiss如何修改...
         
     }
     ps.showPhotoLibrary(sender: sender)
@longitachi
Copy link
Owner

不支持这个样子,可以相册dismiss之后,你在给个loading框去做不也行吗?

@StayStar
Copy link
Author

做聊天界面,如果在聊天窗口loading效果不太好,如果修改ZLPhotoPreviewSheet的话 guard !arrSelectedModels.isEmpty else {
selectImageBlock?([], isSelectOriginal)
hide()
viewController?.dismiss(animated: true, completion: nil)
return
}这个方法我需要处理吗?

@StayStar
Copy link
Author

if let vc = viewController {
vc.dismiss(animated: true) {
call()
self?.hide()
}
} else {
self?.hide {
call()
}
}我可以手动处理这个dismiss

@longitachi
Copy link
Owner

做聊天界面,如果在聊天窗口loading效果不太好,如果修改ZLPhotoPreviewSheet的话 guard !arrSelectedModels.isEmpty else { selectImageBlock?([], isSelectOriginal) hide() viewController?.dismiss(animated: true, completion: nil) return }这个方法我需要处理吗?

理论上是不会走到这里的,走到这里代表没选择任何图片,也不用处理

@ZClee128
Copy link

我也希望可以外部控制,dismiss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants