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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:59:46+00:00 2026-05-27T23:59:46+00:00

in my app, I have a table in one of the viewControllers. When one

  • 0

in my app, I have a table in one of the viewControllers. When one of the rows are tapped, it takes the user to a different view/viewController and it works. Within this new viewController, data is being parsed from a php script in the background.

This takes about 7-10 seconds and in this time I want the user to IMMEDIATELY see a spinner that says “Loading..”. I have implemented this myself but the spinner does not start to load until 4-5 seconds in. During this time, the screen is completely frozen and I cannot tap anything or go back until the spinner/data is displayed.

I have tried to put the following code within the method that does the actually fetching of the data, within both (not at the same time) the viewDidAppear and ViewDidLoad methods as well but the same thing happens.

If anyone knows how to fix this, it would be much appreciated.

Thank you

   [web loadRequest: [NSURLRequest requestWithURL: [NSURL   URLWithString:@"http://xxx.xx.xx.xxx/stuff/xxx.php"]]];

    [web addSubview:spinner];

    timer = [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector: @selector(tick) userInfo:nil repeats:YES];


    load_message = [[UIAlertView alloc] initWithTitle:@"Loading..." message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:nil];

    spinner= [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    spinner.center = CGPointMake(135.0, 60.0);
    [load_message addSubview:spinner];




-(void) tick 
{

if(!web.loading) 
{
    [spinner stopAnimating];    
    [load_message dismissWithClickedButtonIndex:0 animated:TRUE];



}   

else {

    [load_message show];
    [spinner startAnimating];
}



}
  • 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-27T23:59:47+00:00Added an answer on May 27, 2026 at 11:59 pm

    You could start your spinner then start your long process after a delay:

    - (void)someMethod
    {
      [spinner startAnimating];
      [self performSelector@selector(doLongProcess:) withObject:someObject afterDelay:0.0];
    }
    - (void)doLongProcess:(id)someObject
    {
      //Some really long process
    }
    

    Your spinner was most likely blocked because a long process may be occurring on the same thread.

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

Sidebar

Related Questions

I have one table view within the app that I hope multiple parts of
I have an app that presents Table View of different files. I have it
In my app I have a table view and 4 images view in one
In my app I have one DB table with that structure: user TEXT |
In my app I have SQLite database that has one table with date rows
I have a table in a django app where one of the fields is
In my iPhone app I have a table view where I add a tick
In my app I have a scroll view and four table views. Each time
I have a working table view on my iphone app, and am implementing a
I have a categories table view controller. In my app, categories can have subcategories.

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.