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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:44:32+00:00 2026-06-06T13:44:32+00:00

I have a UITableViewController that displays cells that are just default. Each cell can

  • 0

I have a UITableViewController that displays cells that are just default. Each cell can be touched and taken to a list that is within the “account” that each cell in the first view holds.

I connected everything up with a segue and then in my first view I call:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"showDetail"]) {
        NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
        Account *nextAccount = [self.list objectAtIndex:indexPath.row];
        DetailViewController *viewController = (DetailViewController *)[segue destinationViewController];
        viewController.account = nextAccount;
    } 
}

and then in the detail view’s viewDidAppear:(BOOL)animated I say:

 - (void)viewDidAppear:(BOOL)animated {
self.list = [self.account.list mutableCopy];
}

and then I have a UITableViewController on the detail view but in the cellForRowAtIndexPath: method I access the self.list but it doesn’t seem to be working. I know my cellForRowAtIndexPath: works because earlier I did some template work with the method and it worked fine. It seems to be just the prepareForSegue: isn’t working or the property isn’t being set.

Thanks in advance!

  • 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-06T13:44:33+00:00Added an answer on June 6, 2026 at 1:44 pm

    It’s probably trying to set up the detail table view long before viewDidAppear is called. Instead try overriding the setter for the data model:

    -(void)setList:(List*)list    // or whatever type list is
    {
        if (_list != list) {
            _list = [list mutableCopy];
        }
    }
    

    Then it should create the copy before the view is loaded.

    Also if you’re going to override viewDidAppear, be sure to call the super:

    [super viewDidAppear];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple UITableViewController in a UINavigationController that displays a list of strings
I have 8 cells that are being built in my UITableViewController. I would like
I have made a XML parser that list correctly in the UITableViewController. It passes
I have a subclass of UITableViewController. I have code that can add/remove a UISearchBar
I have a UITableViewController that when opened displays a table of the following object:
Right now I have an UITableViewController that displays a set of Artist objects sorted
I have a modal that displays over a UITableViewController which should display different text
I have a UITableViewController containing some very basic data. Assume each row just contains
I have a table view that displays custom cells, the cells contain an image
I have an iPad app that has a UITableViewController that implements the NSFetchedResultsControllerDelegate .

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.