jonasgessner / jgprogresshud-swiftui Goto Github PK
View Code? Open in Web Editor NEWEasily show HUDs with SwiftUI! Lightweight SwiftUI wrapper for JGProgressHUD for iOS, tvOS, Catalyst.
Home Page: https://jonasgessner.com
License: MIT License
Easily show HUDs with SwiftUI! Lightweight SwiftUI wrapper for JGProgressHUD for iOS, tvOS, Catalyst.
Home Page: https://jonasgessner.com
License: MIT License
As I see the current state of art, I need to do dismiss(afterDelay: )
with the hud. What about dismissing it with when there is a change in a property of a view model. Let's say I want to hide after fetching is completed. I am doing it this way, I don't know whether it is a good approach or not.
hudCoordinator.showHUD {
let hud = JGProgressHUD()
hud.textLabel.text = "Fetching Profile Details....."
hud.textLabel.font = UIFont(name: FontConstants.poppinsMedium, size: 12)
hud.backgroundColor = UIColor(white: 0, alpha: 0.4)
viewModel.$fetchedCompleted.sink { completed in
if completed {
hud.dismiss()
}
}.store(in: &viewModel.subscription)
return hud
}
Can anybody guide me with this?
As title.
The ContentView is wrapped with JGProgressHUDPresenter and showing some HUDs, presenting a .sheet page (eg.: some PreferencesView) which is also wrapped with another JGProgressHUDPresenter. Calling show() in the sheet page only shows the HUD in the content view, behind the sheet view itself. (observed from Xcode view hierarchy)
Passing the hudCoordinator from ContentView to .sheet(), instead of wrapping .sheet with JGProgressHUDPresenter, does not help.
Any ideas on this? Or is there another (correct) way to show the HUD? Thanks!
(Falling back to use objc JGProgressHUD now)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.