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

  • Home
  • SEARCH
  • 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 3791172
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:25:44+00:00 2026-05-19T12:25:44+00:00

My application is navigation base , I have two Table ViewControllers ,I am selecting

  • 0

My application is navigation base , I have two Table ViewControllers ,I am selecting data from second tableview and updating to details label of first tabaleview. The following code i am tried but not updating , I am getting secondtableview value in “Updatetableviewlable” method but i am not updating “cellForRowAtIndexPath” method, where i am doing mistake .. please any one guide me .

     @class First;

            @interface FertilityAppAppDelegate 


                First *firstObj;

            @property (nonatomic,retain) First *firstObj;

            @implementation FertilityAppAppDelegate
            @synthesize firstObj;


> didFinishLaunchingWithOptions


 //code 1
//  Updating detail view from second tableview to first tableview .


        firstObj= [[First alloc] initWithNibName:  @"First" bundle:nil];
        UINavigationController *aNavigationController = [[UINavigationController alloc]   initWithRootViewController: firstObj];
        self.navigationController = aNavigationController;
        [window addSubview:navigationController.view];
        [window makeKeyAndVisible];
        return YES;
 //code 2
// Not Updating detail view from second tableview to first tableview

      mainmenuObj = [[Mainmenu alloc] initWithNibName:@"Mainmenu" bundle:nil];
        firstObj= [[First alloc] initWithNibName:  @"First" bundle:nil];
        UINavigationController *aNavigationController = [[UINavigationController alloc]   initWithRootViewController: mainmenuObj];
        self.navigationController = aNavigationController;
        [window addSubview:navigationController.view];
        [window makeKeyAndVisible];
        return YES;         


        @interface First 
                 NSString *symptomlabel; FertilityAppAppDelegate *Appdelegate;
         @property (nonatomic,retain) NSString *symptomlabel    
        @implementation First
            @synthesize symptomlabel;


            - (void)viewDidLoad
            { 
                Appdelegate = (FertilityAppAppDelegate*)[[UIApplication sharedApplication] delegate];


            }

            -(void) Updatetableviewlable:(NSString*)lable
            {
                symptomlabel=[lable retain] ;
                NSLog(@"the update value is  %@", lable);


            }
            - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath
    *)indexPath 
        {
            static NSString *cellId = @"CellId";

            UITableViewCell *cell = (UITableViewCell*)[tableView dequeueReusableCellWithIdentifier:cellId];
            if (cell == nil) 
            {
                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellId] autorelease];
                cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;   
            }
            switch (indexPath.section) 
            {
                case 0:
                {   
                    cell.textLabel.text = [self.MenstruationtoWakingArray objectAtIndex:indexPath.row];

                    if(indexPath.row==0)
                    {
                        UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(160, 25, 125, 15)];
                        myLabel.text =symptomlabel;
                        myLabel.backgroundColor = [UIColor clearColor];
                        myLabel.textColor=[UIColor blueColor];
                        [self.tableView addSubview:myLabel];
                        NSLog(@"The Save file is:%@",symptomlabel);


                    }                    
                //statement case upto 10        
                }
        }           
        }
            @interface Second : UITableViewController 

            {


                FertilityAppAppDelegate *appDelegate;
            }


             @implementation Second tableview

                                viewDidLoad 

                                appDelegate = (FertilityAppAppDelegate
    *)[[UIApplication sharedApplication] delegate];


            - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
    *)indexPath
            {
             if(indexPath.section==0)
             {     
              if (indexPath.row==0)
              {       
                NSString *updatelable =@"None";
                [appDelegate.firstObj Updatetableviewlable:updatelable];
                 appDelegate.selectedRow =indexPath.row;
              }
              //statement upto row 5

             }
                [self.tableView reloadData]; 
            }
  • 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-19T12:25:45+00:00Added an answer on May 19, 2026 at 12:25 pm

    In your Updatetableviewlable: method, you are assigning lable to symptomlabel. In this case, the symptomlabel may not retain the string lable. You try having Updatetableviewlable: method like this.

    - (void)Updatetableviewlable:(NSString*)lable {
    
        symptomlabel = [lable retain];
        NSLog(@"%@", symptomlabel);
    }
    

    And make sure your cellForRowAtIndexPath: method looks something like this.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
        ...
    
        UILabel *myLabel;
    
        if (cell == nil) {
    
            myLabel = [[UILabel alloc] initWithFrame:CGRectMake(160, 25, 125, 15)];
            myLabel.backgroundColor = [UIColor clearColor];
            myLabel.textColor=[UIColor blueColor];
            myLabel.text = symptomlabel;
            [myLabel setTag:1];
            [cell.contentView addSubview:myLabel];
            [myLabel release];
    
        } else {
    
            myLabel = [[cell contentView] viewWithTag:1];
            myLabel.text = symptomlabel;
        }
    
        ...
    }
    

    Add also make sure you are reloading the table view in viewWillAppear: method of your First.m.

    - (void)viewWillAppear:(BOOL)animated { 
    
        [[self tableView] reloadData]; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In NYTimes iPhone application, one bar exist in between table header and navigation bar
I am interested in writing a simplistic navigation application as a pet project. After
I'm working on a project that uses an MDI application with a navigation panel
i am developing a iphone application in a view-based project,(not navigation) however i would
My application dynamically loads assemblies at runtime from specific subfolders. These assemblies are compiled
Application able to record error in OnError, but we are not able to do
Application frameworks such as DotNetNuke, Eclipse, Websphere and so forth are available today which
Application has an auxiliary thread. This thread is not meant to run all the
Application 1 - Opens a SqlConnection and a SqlTransaction against a SQLServer 2005 database
The application my team is currently developing has a DLL that is used 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.