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

SVProgressHUD.showInfo(status),2s dismiss #1078

Open
LCBbest opened this issue Mar 31, 2021 · 1 comment
Open

SVProgressHUD.showInfo(status),2s dismiss #1078

LCBbest opened this issue Mar 31, 2021 · 1 comment
Labels

Comments

@LCBbest
Copy link

LCBbest commented Mar 31, 2021

SVProgressHUD.showInfo(status)。
after 2s dismiss。
but after 1s,I want to show()。no status。
then after 1s SVProgressHUD.show() dismiss. I dont want it dismiss.
How should I do it

func

func showHUD(_ title:String = "") {
    SVProgressHUD.setDefaultStyle(.dark)
    SVProgressHUD.setRingNoTextRadius(15)
    SVProgressHUD.setDefaultMaskType(.clear)
    if !title.isEmpty{
        SVProgressHUD.setImageViewSize(CGSize(width: 0, height: -10))
        SVProgressHUD.showInfo(withStatus: title)
        SVProgressHUD.dismiss(withDelay: 2)
        SVProgressHUD.setCornerRadius(5)
    }
    else{
        SVProgressHUD.setImageViewSize(CGSize(width: 28, height: 28))
        SVProgressHUD.setCornerRadius(14)
        SVProgressHUD.show()
    }
}

use

      showHUD("hello")
       DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
           showHUD()
       }
@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant