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

  • Home
  • SEARCH
  • 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 3694260
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:28:32+00:00 2026-05-19T04:28:32+00:00

I have this method: -(IBAction)clickedDone; { UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; spinner.center =

  • 0

I have this method:

-(IBAction)clickedDone; {
    UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    spinner.center = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height / 2);
    [spinner startAnimating];

    //intensive stuff here
}

However, the spinner doesn’t have time (I presume) to start before the intensive stuff comes afterward which blocks the main thread I guess. I want to know if there’s a way to get this spinner animating before the thread is blocked. It’d be too much work to refactor my code to run the “intensive stuff” in a detached thread. The only alternative I can think of would be to delay the “intensive stuff” for a fraction of a second in order for the spinner to start.

What do you all think?

  • 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-19T04:28:32+00:00Added an answer on May 19, 2026 at 4:28 am

    I think you need to put the expensive stuff on a second thread. Otherwise you block the interface as you say. It may be more work, but thats better than a bad user experience.

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

Sidebar

Related Questions

In my view I have a button, which is hooked to this method: -(IBAction)showStore:(id)sender
I have this code : -(IBAction)OkButtonPressed:(id)sender{ NSLog(@BTN OK); RecherchePartenaireTableView *recherchePartenaireTableView=[[RecherchePartenaireTableView alloc]init]; recherchePartenaireTableView.mytext=textFieldCode.text; [self.navigationController popViewControllerAnimated:YES];
Observe this perfectly simple UIViewController subclass method: -(IBAction)launchSearch { OffersSearchController *search = [[OffersSearchController alloc]
I have a method called -(IBAction)setPicker:(id) sender Basically this method substitutes a keyboard into
I have this method to add an event to iOS calendar: -(IBAction)addEvent:(id)sender { EKEventStore
I have this method (someone else wrote it!) - (IBAction)showMasterPopover:(id)sender { if (_hiddenPopoverController &&
I have this code: -(IBAction) doSomething{ FirstViewController *firstViewController = [[[FirstViewController alloc]init]autorelease]; [firstViewController.label1 setAlpha:1.00]; [firstViewController.label2
in my app, I have an IBAction method to change view to a another
This is what I have in a public method - (IBAction)methodName NSString *quoteNumber =
I have this method which lets me translate the position of an object, animating

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.