Giter Club home page Giter Club logo

Comments (7)

binho avatar binho commented on May 17, 2024

+1

from jgprogresshud.

JonasGessner avatar JonasGessner commented on May 17, 2024

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.

plaetzchen avatar plaetzchen commented on May 17, 2024

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.

JonasGessner avatar JonasGessner commented on May 17, 2024

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.

plaetzchen avatar plaetzchen commented on May 17, 2024

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.

JonasGessner avatar JonasGessner commented on May 17, 2024

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.

plaetzchen avatar plaetzchen commented on May 17, 2024

Yes it is let's not get this any further.

BTW: Ex-Pirat

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.