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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:08:14+00:00 2026-05-28T11:08:14+00:00

I have a UITableView which from an external RSS feed. When you select a

  • 0

I have a UITableView which from an external RSS feed.

When you select a row it uses navigationController and slides in from the right, the problem is that the RSS feed contains images therefore it can can take a few seconds to load and without any indication of what is going on you can mistake it for an application crash.

I decided to add a spinner so that you know that new page is loading.

Here is my code:

RootViewController.m

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"Loading New Page");

[tableView deselectRowAtIndexPath:indexPath animated:YES];
DetailsViewController *detailViewController = [[DetailsViewController alloc] initWithNibName:@"DetailsViewController" bundle:nil];
detailViewController.item = [rssItems objectAtIndex:floor(indexPath.row/2)];
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];

UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
spinner.center = CGPointMake(160, 240);
[self.view addSubview:spinner];
[spinner startAnimating];
[spinner release];

}

DetailsViewController.m

- (void)viewDidLoad {
    [super viewDidLoad];

        NSString *imgURL = [item objectForKey:@"image"];
        NSData *mydata = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:imgURL]];
        item_photo.image = [[UIImage alloc] initWithData:mydata];

    item_title.text = [item objectForKey:@"title"];
    item_date.text = [NSString stringWithFormat:@"Date: %@",[item objectForKey:@"date"]];
    item_time.text = [NSString stringWithFormat:@"Time: %@",[item objectForKey:@"time"]];
    item_cost.text = [NSString stringWithFormat:@"Cost: £%@",[item objectForKey:@"cost"]];
    item_info.text = [item objectForKey:@"description"];
    self.navigationItem.title = @"Event Type";
}

There are two problems with this code.

  1. The Spinner does not active until after the new page has loaded.
  2. The Spinner does not disable once loaded.

If anyone could help me with this problem i would be truly gratefully.

  • 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-28T11:08:15+00:00Added an answer on May 28, 2026 at 11:08 am

    You are adding the activity indicator view to the view of the controller which is pushing the detail view controller, so you wont see it anyway

    try moving the second group of code to the viewDidLoad method of DetailsViewController, you can call stopAnimating on the activity indicator when you are finished loading. To get a reference to the UIActivityIndicator you should add a tag

    e.g. in viewDidLoad

    UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    spinner.center = CGPointMake(160, 240);
    spinner.tag = 12;
    [self.view addSubview:spinner];
    [spinner startAnimating];
    [spinner release];
    

    in the loadingFinished method (whichever method is called when finished loading)

    [[self.view viewWithTag:12] stopAnimating];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableView which lies in a NavigationController that is in a popover.
I have a UITableView which shows some information. The informations are from a XMLFile.
I have a UITableView in my app in which I load several images from
I have a UITableView , which I am controlling from a custom UIViewController .
I have a UITableView which loads data from XML using the below code. It
Short Explanation Currently I have a UITableView which contains cells of videos from a
I have a UITableView which uses a singleton object as a datasource. I have
I have a UITableView which I have assigned sections. When using didSelectRowAtIndex with indexPath.row
In my iPhone app, I have a (non-grouped) UITableView which uses all the bells
I have a ViewController that contains a UITableView in which the cells are created

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.