Comments (3)
SVProgressHUD's implementation is fundamentally wrong IMO. By showing the HUD directly in a defined view, specifically a UIViewController's view, handling interface orientation changes becomes a painless process. Also SVProgressHUD only allows one HUD at a time, while JGProgressHUD is not built as a singleton component. You could however make a custom category for JGProgressHUD in which you present a UIWindow with window level alert, present a UIViewController in that window and show the HUD inside of the UIViewController's view. Its just a few lines of code!
from jgprogresshud.
The biggest problem of SVProgressHUD is it's a singleton on the UIWindow, if you use it's default style it won't blocking the whole screen, then user may tap on a button and push to another view controller, but the hud won't go away. If you block all user's interactions with SVProgressHUD's black style, it would become meaningless to make an asynchronized operation, the user can't do anything anyway, staring at a little nice spinner isn't that funny.
By the way, it would be neat to provide the "tap to cancel operation" feature.
from jgprogresshud.
You can subclass JGProgressHUD and add a gesture recognizer to the HUDView. Or you can fork JGProgressHUD, add the functionality and send a pull request. If it looks good I might pull the code and add it to the main repo. Cheers!
from jgprogresshud.
Related Issues (20)
- SwiftUI Example HOT 1
- Feature Request: showAfterDelay HOT 4
- Incorporate NVActivityIndicatorView Animations HOT 3
- Size of JGProgressHUDIndicatorView HOT 2
- Don't show up immediately HOT 1
- Thanks for the simple & effective repository. How to achieve Multiple Spinners showing at same time by using this library?
- How to achieve Multiple Spinners showing at same time by using this library? HOT 1
- JGProgressHUD
- Add a blur view BEHIND the hud HOT 1
- Unable to resolve SPM dependency in Xcode HOT 3
- Support for Xcode 11.7 HOT 1
- JGProgressHUD(automaticStyle: ()) doing the opposite HOT 3
- background task crash when updating progress HOT 1
- How to change shadow HOT 1
- Allow for a text only mode ? HOT 1
- Cannot recreate the demo style HOT 2
- Cancel Button HOT 1
- Ios 16 dynamic island HOT 2
- xcode 14.3 not compiled HOT 3
- [UIView initWithFrame:] must be used from main thread only HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jgprogresshud.