Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7436197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:12:01+00:00 2026-05-29T10:12:01+00:00

Just for my curiousity, I am trying to rewrite the following code // show

  • 0

Just for my curiousity, I am trying to rewrite the following code

// show HUD (with animation)
[SVProgressHUD showWithStatus:@"loading..."];

// wait for HUD to safely finish showing its animation
// (loading HUD will be visible for 1 sec)
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1]]

// dismiss HUD
// (dismiss HUD will be visible for 2 sec)
[SVProgressHUD dismissWithSuccess:@"finished!" afterDelay:2];

into the code using Grand Central Dispatch.

I tried using dispatch_source_t, dispatch_semaphore_t, and dispatch_after,
but doesn’t quite work well:( and I need your help!

Please note that I don’t want to wrap SVProgressHUD’s methods with any blocks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:12:01+00:00Added an answer on May 29, 2026 at 10:12 am

    You really can’t. Or, you could, but it’d be a ton of work that would ultimately just wrap the NSRunLoop stuff itself.

    Within the context of iOS and Mac OS X, the main event loop is a run loop and things like modal panels, HUDs, and the like are all designed around that detail.

    The code you are showing is a nested run loop. You are effectively running the main run loop in a sub-loop within an outer loop that is also maintained by the main run loop! (If you were to set a breakpoint on an action method fired within your internal loop, you would see what I mean in the backtrace).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to code my own JS drag and drop script (out
Just for curiousity sake, what exactly is the difference between folders and packages? Because
I call an action helper in one of my views using the following code
What happens if I finish the drive letters? It's just curiosity, but I have
I am trying to move email from one pst to another. Sample code from
I noticed when trying to post form data in JSON format, that the following
I'm trying to run the following line of script in bash on Mac OS
Just out of curiosity, I am trying to see if it is possible to
Just a curiosity: is there an already-coded way to convert a printed traceback back
Just for curiosity... If possible, where can I find and see the javascript submit()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.