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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:51:05+00:00 2026-05-30T19:51:05+00:00

I searched, but didn’t find good answer to this: It should be pretty straightforward,

  • 0

I searched, but didn’t find good answer to this:

It should be pretty straightforward, I navigate from a parent TableView to a child TableView that implements only the selection option for a cell in parent View.

In childTableView, I would like to pass back the value chosen by user in child view (selection one of the cell in this view) to parent view and update the “cell.detailTextLabel.text” in parent view, I can find when the back button in child view got tapped but cannot find how/where to update the cell in parent view with new value got from child view’s cell.

My second question is how to pass the data to parent view.

  • 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-30T19:51:06+00:00Added an answer on May 30, 2026 at 7:51 pm

    Try the following

    In child view, define a protocol

    // childViewController.h
    @protocol ChildDelegate;
    
    @interface childViewController
    {
        id <ChildDelegate> delegate;
    }
    
    @property (nonatomic, weak) id <ChildDelegate> delegate;
    @end // interface
    
    @protocol ChildDelegate <NSObject>
        - (void) selectedData: (NSString*) text;
    @end
    

    Send data when user selects a cell

    // childViewController.m
    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    {
        ...
        ...
        // send info the mainViewController
        [self.delegate selectedData: (NSString*) [dataSource objectAtIndex: indexPath.row]];
    }
    

    In mainViewController, implement this protocol

    - (void) selectedData: (NSString*) text
    {
       // retrieve current selected row, and update with text.
    }
    

    // don’t forget to set the delegate when you create the childViewController

    child = // create child
    child.delegate = self;
    // save currently selected row
    // push childViewController
    

    Hope it helps.

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

Sidebar

Related Questions

Hello I searched for an answer to this question but didn't find any here.
I have searched this question but didn't get / or understood the answer I
I searched around a little bit for information on this but didn't find anything
I searched the forums but didn't find any answers to this question. I am
I searched the net and books, for an answer but didn't find it. (maybe
I searched for this but didn't find an solution that totally fixed my problem.
I read on here and searched a lot but didn't find the answer, so
I searched everywhere but didn't find the solution. I have image 1. How can
I have searched a bit on google, but didn't really found an answer to
I searched the registry. I'd expect the settings in HKEY_CURRENT_USER\Software\CodeGear\BDS\7.0 but didn't find anything.

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.