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

The Archive Base Latest Questions

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

I have a UITableView with a Navigation Controller . The table view is made

  • 0

I have a UITableView with a Navigation Controller. The table view is made up of custom cells that each contain data that is downloaded from a server, obviously this downloading is time consuming and therefore I would like to show a HUD of some sort while this happens.

My problem is this, when I press the button to transition to the table view, the button that I press gets stuck in the “highlighted” state until all the data is downloaded, then the view transitions from the previous one to show the table view in all its glory. However, I would prefer to transfer to an empty table view, then show a loading HUD while the table is populated. (Or something similar, anything to show the user the program is actually doing something and hasn’t crashed..)

Here is some of my code:

- (void) displayView:(int)intNewView{

    NSLog(@"%i", intNewView);
    [currentView.view removeFromSuperview];
    [currentView release];

    switch (intNewView) {
        case 1:
            currentView = [[View1 alloc] init];
            break;
        case 2:
            currentView = [[View2 alloc] init];
            break;
        case 3:
            currentView = [[View3 alloc] init];
            break;
        case 4:
            currentView = [[View4 alloc] init];
            break;
        case 5:
            vc = [[TableViewController alloc] init];
            currentView = [[UINavigationController alloc] initWithRootViewController:vc];
            [currentView setTitle:@"Events"];
            break;
    }

    [UIView beginAnimations:nil context:nil];

    [UIView setAnimationDuration:0.5];

    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft  forView:self.view cache:YES];


    [self.view addSubview:currentView.view];

    [UIView commitAnimations];

}




 - (void)viewDidLoad {
    [super viewDidLoad];
    //Initialisation code..

[SVProgressHUD showInView:self.view status:@"Doing Stuff"];

    [self viewDidAppear:YES];
}

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

    NSLog(@"ViewDidAppear");

    if ([stories count] == 0) {
        NSString * path = @"http://myURL.com";

        [self parseXMLFileAtURL:path];
    }


}

I understand why the view doesn’t transition and show the HUD before viewDidAppear is called, just not how to get around this? The bulk of the work is started by viewDidAppear.

Any help would be greatly appreciated,

Jack

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

    I think you should make the whole thing asynchronous. I mean, once you get to your table, you render it as empty, assigning to it a data source with no data, make a HUD appear, then you launch a thread that will load data from the remote server.

    Once the thread has completed its task, you can send a notification through your app, which you have previously bound your table to. So, when the table gets the notification that the thread has completed its tasks, you update the data source, dismiss the HUD, and reload the table.

    If you need more details on this, please ask.

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

Sidebar

Related Questions

I have created a table view that pulls its cells from an array. Each
I have a view controller that is used to populate data from the core
I have a UITableView on a view. This UITableView has cells which are made
I have a navigation controller with a table view. In most tutorials I've read
I have a tableview controller under a navigation controller. Some of my table cells
I have this code in my table view controller (and delegate): - (void)tableView:(UITableView *)tableView
I have an iphone app that uses table view as the interface. Each time
I have a very strange problem with a UITableview within a navigation controller on
i have just converted an app i was making from a navigation controller app
I have a table view made up of an NSArray of instances of 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.