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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:51:28+00:00 2026-06-11T09:51:28+00:00

wanted to see if somebody can provide some suggestions/pointers on how to address this

  • 0

wanted to see if somebody can provide some suggestions/pointers on how to address this issue I am currently facing for an iPad app. Here is a link to the graphic that I am describing below
http://www.yogile.com/dsruyzk7/41m/share/?vt=QANtu4j

Basically I have a parentViewController which contains 2 child view controllers. Child 1 has a UITableView and
Child 2 has a custom UIView. I am able to load the info from UITableview on Child 1 to the custom UIView on Child 2 from didSelectRowAtIndexPath. After the data is
displayed on Child 2 I do some processing. After the processing is complete, I need to update the UITableView on Child 1 so that the new/updated data
gets displayed on the UITableView. I tried creating a delegate on Child 1 but wasn’t working maybe I set something wrong. So any help suggestion would be greatly appreciated.

Thanks

.h on Child 2 ViewController

@class Child2ViewController;

@protocol child2Delegate <NSObject>
- (void)refreshTable:(Child2ViewController*)controller passedDict:(NSDictionary *)dict;

@interface Child2ViewController:UIViewController<UITableViewDataSource, UITableViewDelegate> {
    UITableView *myTableView;
    id<child2Delegate> delegate;
    Child1ViewController *child1VC;
}

@property (nonatomic, weak) id<child2Delegate> delegate;
…
…

@end

.m on Child 2 ViewController

@synthesize delegate;
…
..
..
#after all the processing is done we are ready to refresh the view
#updatedDictForTableView is basically a NSDictionary and has the updated data needed
#for the UITableview on child1VC.

-(void)processData {
    child1VC.delegate = self
    NSLog(@"Dump the updated Data : %@", updatedDictForTableView);
    [delegate refreshTable:self passedDict:updatedDictForTableView;
}

.h in Child1 ViewController

@interface Child1ViewController : UIViewController <child2Delegate> {
    ….
    ….
    ..
}

.m in Child1 ViewController

- (void)refreshTable:(Child2ViewController*)controller passedDict:(NSDictionary *)dict {
    NSLog(@"dump dict %@", dict);
    [myTableView 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-06-11T09:51:29+00:00Added an answer on June 11, 2026 at 9:51 am

    You can do that without delegate, use NSNotificationcenter to send a notification with your values in the nsdictionary: exple :

      // in child1 ( in viewDiDLoad function )
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(FunctionToReloadData:) name:@"ProcessDone" object:nil];
    
      // remove the listnerin child1 ( in viDidUnload )
    [[NSNotificationCenter defaultCenter] removeObserver:self forKeyPath:@"ProcessDone"];
    
     //in child2 ( in the end of your processData function )
     [[NSNotificationCenter defaultCenter] postNotificationName:@"ProcessDone" object:nil userInfo:updatedDictForTableView ];
    
    
     //in child1
     -(void) FunctionToReloadData:(NSNotification *)notification
     {
        // get the sended dictionary
        NSDictionary *tmpDic = [notification userInfo];
         .
         .
         [tableView reloadData];
    
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to see if I can write some c# code in a javascript-fashion
I've run into a little hurdle and wanted to see if somebody could help
I wanted to see what some suggested approaches would be to validate a field
Im making an application in cocoa and wanted to see if some strings in
currently, I'm doing an update similar to as follows, because I can't see a
I wanted to see if I can better organize / optimize my code, and
This may not be possible but just wanted to see if anyone could point
So I was playing around with some code and wanted to see which method
i seem to write this code over and over again and wanted to see
I made an application and I wanted to see if I can improve performance

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.