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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:33:54+00:00 2026-05-23T11:33:54+00:00

Im very new in xcode 3 and i really need help for this I

  • 0

Im very new in xcode 3 and i really need help for this

I developed my apps using UITableView and XML to showed the content.

i had 3 .xib files which it rootViewController , SecondViewController and mainview.

So the problem is:
When i try to executed didSelectrow in rootViewController and access the NSMutableArray *array in SecondViewController and replace the *array value with new array value in rootViewController before pushed animation.

The array value on my SecondViewController was changed for the first time but when i pushed the back button and select the other row, my SecondViewController array kept read the previous array not change to a new one. I try to initialize but no luck

This is my code on rootViewController UITableview (didSelectRow):

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    if(2ndController == nil)

2ndController = [[DetailViewController alloc] initWithNibName:@"SecondViewController" bundle:[NSBundle mainBundle]];

    //Declare xml NSMutable array record
    ListRecord *record = [self.entries objectAtIndex:indexPath.row];

    //access SecondViewController NSMutable *record
    2ndController.record = [[[NSMutableArray alloc] init] autorelease];   

        //inserting the value from firstview to secondview before push
    2ndController.record = record;



    //push animation
    [self.navigationController pushViewController:2ndController animated:YES];



}

This is my second view controller :

- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
    }

    switch(indexPath.section)
    {
        case 0:

            [cell setText:record.name];
            break;
        case 1:

            [cell setText:record.Age];
            break;
        case 2:
        [cell setText:record.summary];
            break;
    }

    return cell;
}

Hope someone can help me..

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-05-23T11:33:54+00:00Added an answer on May 23, 2026 at 11:33 am

    Few things,

    You do,

    2ndController.record = [[[NSMutableArray alloc] init] autorelease];
    

    and follow it up with

    [cell setText:record.name];
    

    Clearly, the record property doesn’t seem to be an instance of NSMutableArray so I think the array initialization part is incorrect as you do, and already mentioned,

    2ndController.record = record;
    

    But the problem I think is that you are retaining your UITableViewController subclass. Have you tried reloading the data?

    [self.tableView reloadData];
    

    Add it in the viewWillAppear method of your DetailViewController.

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

Sidebar

Related Questions

I am new to iphone and xcode. This may be a very simple question
xcode 4.2 ios 5 single view template I am very new to this ios
I'm somewhat new to XCode and am very accustomed to using Visual Assist with
Im very new to SQL but need to write a query to do the
Warning - I am very new to NHibernate. I know this question seems simple
I still very new using Subversion. Is it possible to have a working copy
I am very new to creating webservers - and I have had several goes
I am new to Mac, iOS, Xcode and objective-c. I am very familiar with
Very new to Objective-C and Xcode and working my way through modifying the DrillDownApp
Hi there I am new to C programming and have been using Xcode to

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.