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 5998375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:23:50+00:00 2026-05-23T00:23:50+00:00

in my iOS app I do the following. viewDidAppear(){ // Load a spinner in

  • 0

in my iOS app I do the following.

viewDidAppear(){

   // Load a spinner in a view on the top
   [DSBezelActivityView newActivityViewForView:self.view]; 
   // Execute code that require 3 seconds
   ...
   // Stop the spinner
   [DSBezelActivityView removeViewAnimated:YES];
}

The problem is that the spinner doesn’t appear, because the the cpu is working hard (something similar). It’s like that the code betweek the start and stop has precedence on the rendering of the view.

I would love to find a way to show effectively the start of the spinner, without using a timer to delay the code execution.

Thanks

  • 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-23T00:23:51+00:00Added an answer on May 23, 2026 at 12:23 am

    If you have a method like

    -(void) showSpinner:(UIView*)view {
        dispatch_async(dispatch_get_main_queue(), ^{
            [DSBezelActivityView newActivityViewForView:view];
        });
    }
    

    there are several ways to call it from a different thread. Choose one from the following:

    [NSThread detachNewThreadSelector:@selector(showSpinner:) toTarget:self withObject:self.view];
    // or 
    [self performSelectorInBackground:@selector(showSpinner:) withObject:self.view];
    // or 
    NSInvocationOperation *invOperation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(showSpinner:) object:self.view];
    NSOperationQueue *opQueue = [[NSOperationQueue alloc] init];
    [opQueue addOperation:invOperation];
    // or 
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        [self showSpinner:self.view];
    });
    

    Alt + click for details.

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

Sidebar

Related Questions

I have a titanium based iOS app that basically is following my own MVC
In Your Second iOS app, there is a portion that says the following: After
I'm working on an iOS app and I'm using the following code for one
in my iOS app's viewDidLoad method, i have the following line of code: loadDict
I use the following code in my iOS app to use Instagram iPhone hooks
as I am following the second of Apple's beginner-tutorials Your second iOS App, it
I am making a drawing app for iOS and I have the following classes:
I've got an iOS app that allows a user to connect to our server
I got an iOS app with table view. When i select rows several times,
I am developing an iOS app that allows users to download documents off a

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.