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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:57:10+00:00 2026-06-07T05:57:10+00:00

I have a UINavigationController that pushes a custom UITableViewController onto the stack. This pushed

  • 0

I have a UINavigationController that pushes a custom UITableViewController onto the stack. This pushed view controller, which is also the the table view delegate and data source, will then need to download the required data from the internet before it can be displayed. This process of downloading also happens when the user scrolls to the bottom of the the table view, in which the new downloaded data is appended to the bottom of the table view.

I want to notify the user that this downloading is occurring. The problem is that I have tried many methods, yet the table view does not display any of the changes I have made before the downloading occurs. I have encapsulated the notification and download into a single method within my custom UITableViewController class:

- (void) extractArticlesFromURL:(NSURL) url
{   
    // 1st method - set alpha
    self.tableView.alpha = 0.2;

    // 2nd method - push an overlay while downloading
    UIViewController* overlay = [[UIViewController alloc] init];
    overlay.view.backgroundColor = [UIColor blackColor];
    [self.navigationController pushViewController:overlay animated:NO];

    // 3rd method - introduce a BOOL isLoading, which is used in data source
    // and delegate methods in an attempt to change display
    isLoading = YES;

    [self.tableView reloadData];
    [self.tableView setNeedsDisplay];

    // Spend a few seconds downloading data which is stored in an
    // array which is accessed during UITableViewDelegate method calls...

    self.tableView.alpha = 1;
    isLoading = NO;
    [self.navigationController popViewControllerAnimated:NO];

    [self.tableView reloadData];
}

I call this particular method in -(void)scrollViewDidScroll: (UIScrollView*)scrollView, which is definitely getting called as the table view is appended with new data but with no change in display during the downloading. I do not mind the app freezing up, it’s just it does not update the display before it freezes.

If it helps, I am using XCode 4.3.2 using LLVM 3.1, and testing the functionality with iPhone Simulator 5.1. This component of the application is single-threaded.

  • 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-06-07T05:57:11+00:00Added an answer on June 7, 2026 at 5:57 am

    You get your view frozen because you are taking lots of time to complete these actions and you are running in the main thread.

    The best way to unfreeze the view is to collect all the remote data using a separate thread. When you end loading data, you call your main controller and tell it to update the views (update tables, push new controller, etc).

    Also, when you start loading data in the separate thread, you can update your view in the main thread i.e. adding a spinning wheel or some “Loading …” message on screen.

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

Sidebar

Related Questions

I have a UINavigationController(a) that pushes a UIViewController(b) onto the stack. (b) contains a
I have a UINavigationController that pushes a view controller 3 levels down. I am
I have a custom UINavigationController that draws a custom background. That navigation controller is
I have an app that has a UINavigationController that pushes a UITabBarController into view.
So I have a UINavigationController that pushes a UITableViewController from the rootViewController. From the
I have a UINavigationController with two UITableViewControllers pushed onto its stack. Is there any
I have a UINavigationController that gets pushed a DetailsViewController. In this DetailsViewController, I want
I have an app which starts with a root UINavigationController . This controller then
I have a UINavigationController that contains 3 UIViewControllers on the stack. View A -
I have a UIViewController that is pushed onto a UINavigationController and is currently displayed.

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.