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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:37:03+00:00 2026-06-09T01:37:03+00:00

I am having trouble with a UITableView and segueing from it. The table view

  • 0

I am having trouble with a UITableView and segueing from it. The table view contains a list of places, and when a cell is clicked it segues to a list of photos from that place. It takes a bit of time to load the info for those photos, so it sticks on the list of places for a bit. My problem is that I don’t want to freeze the user out of the app while it’s loading, and if the user decides to switch the place they want, I want them to be able to. Is there a simple solution for this, or would it require a redesign? Here’s what’s called when the cell is clicked:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    self.activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    [self.activityIndicator startAnimating];
    [[tableView cellForRowAtIndexPath:indexPath] setAccessoryView:self.activityIndicator];
    self.query = ^{return [FlickrFetcher photosInPlace:self.locationDataArray[indexPath.row] maxResults:50];};
    self.locationSelected = [[self.locationDataArray[indexPath.row] valueForKeyPath:@"_content"] componentsSeparatedByString:@","][0];
    [self performSelector:@selector(pushView:) withObject:tableView afterDelay:0.0]; // Allows spinner to start spinning before the segue is actually performed. 
}

- (void)pushView:(UITableView *)tableView {
    [self performSegueWithIdentifier:@"Display Image List" sender:self];
}

I’ve tried dispatching performSegueWithIdentifire:sender: to the main queue, but no luck (I didn’t think it would work, anyway). Query is what’s executed by the destination view controller. Any ideas on how to get it to work?

  • 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-09T01:37:05+00:00Added an answer on June 9, 2026 at 1:37 am

    I think, you should perform the segue of course on the main thread (no dispatching), and load a new (empty) tableview with activityIndicator started in its cells. The fetching of images would be dispatched in the viewDidLoad method, and ‘notify’ the view, if the loading has finished, and reload the tableView.

    Like in this tutorial (a simple NSInvocationOperation is used to run the downloading o the background):
    http://www.icodeblog.com/2010/03/04/iphone-coding-turbo-charging-your-apps-with-nsoperation/

    Good luck!

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

Sidebar

Related Questions

I'm having trouble creating a UIView (in Interface Builder) that contains a UITableView with
I am having some trouble with UITableView's reloadData method. I have found that it
I'm having trouble displaying a multi-line UILabel in a custom UITableView cell. I'm currently
I have 2 questions that I am having trouble answering. I have a UITableView
I'm having trouble inserting an array to the table view. I have an array
I am having trouble with my UITableView in the NavigationController. When I add data
I am having trouble animating a custom UITableView section header. The goal was to
Having trouble understanding how to filter an images table by tag information in a
Having trouble with proper regex for RewriteCond RewriteCond %{REQUEST_URI} !^/foo/ Works as expected, that
I'm having trouble understanding coredata with my uitableview. I have rows being deleted and

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.