Giter VIP home page Giter VIP logo

Comments (3)

JonasGessner avatar JonasGessner commented on August 15, 2024

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.

PrideChung avatar PrideChung commented on August 15, 2024

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.

JonasGessner avatar JonasGessner commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.