ivanvorobei / SPIndicator

Floating indicator, mimicrate to indicator which appear when silent mode switched. Can be present from top and bottom. Interactive with gesters.
https://opensource.ivanvorobei.io
MIT License
768 stars 48 forks source link

[Feature Request] Progress Indicator #14

Open Lakr233 opened 2 years ago

Lakr233 commented 2 years ago

Is it possible to make it a progress indicator?

Put a UIActivityIndicatorView at the icon and provide a call back like

SPIndicator.presentProgress(message: "Hello") { completion in
    // do some work
    Backend.shared.load()
    // when done
    completion.send()
}
ivanvorobei commented 2 years ago

Great idea, will do it

Lakr233 commented 2 years ago

And maybe something like this:

SPIndicator.presentProgress(message: "Hello") { indicator in
    // do some work
    Backend.shared.load { progress in
        indicator.send(progress)
    }
    // when done
    indicator.complete()
}
nandorojo commented 1 year ago

this would be awesome!

baronha commented 1 year ago

It would be great if that was implemented.