Comments (7)
+1
from jgprogresshud.
Ok, a few people have requested this now so I'll change it. Still, I believe that if your code is written correctly this shouldn't be a problem at all. I'll incorporate this change in the next commit (don't know when). Feel free to send a pull request if you want this to change soon.
from jgprogresshud.
I got asserts when doing calling the method to hide the hud. Why should I check of it is visible before calling this? This is not a behavior Apple APIs are promoting.=
from jgprogresshud.
You should only call the dismiss method once, because calling it twice makes no sense. You also don't close the door when you leave your house, and then close it again. It makes no sense ;) All I am saying is that with correct API use you should only end up calling the dismiss method once before the hud is then released or shown again. But as I said, as a few people have requested that I remove the asserts so I'll do that the next time I make any other changes to the project.
I got asserts when doing calling the method to hide the hud. Why should I check of it is visible before calling this? This is not a behavior Apple APIs are promoting.=
—
Reply to this email directly or view it on GitHub #16 (comment).
from jgprogresshud.
OK lets play this game one more round: If you have a UILabel and call the [myLabel setHidden:YES] method twice do you get a error? No you don't. Do the app crash without notice? No. Why is this? Because that's what Apple APIs are build like. The fail gracefully. That's the philosophy of Objective C you don't need try {}, you don't need to check for nil (in most cases) and so on.=
from jgprogresshud.
What game, Pirat? I was just joking around so chill a bit. Your example is also kind of wrong since you are comparing a property setter with the dismiss method of JGProgressHUD. Just because something doesn't tell you you're doing it wrong doesn't make it right. I wouldn't write code that calls setHidden:YES twice. It's a thing of keeping your code clean, organized and efficient. This issue is already closed so I don't even know what you keep going on and on about. JGProgressHUD will no longer throw an exception when calling dismiss twice in the future, isn't that what you wanted?
from jgprogresshud.
Yes it is let's not get this any further.
BTW: Ex-Pirat
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.