title: Simple passing of data through delegation in objective C
body: <p>I'm using Xcode to write an app in objective c.  I am trying to pass data from a container view controller to the parent view controller using delegation.  I have successfully passed the data to the parent view controller, but all of the documentation sets what I have sent to the .h header file in the .m implementation file using viewDidLoad or viewDidAppear.  I was wondering, since the view is already present, if there is a way to detect that data has been changed in a view and automatically run a method or code to update the view with the new information.  Something along the idea of didReceiveNewData or didEditExistingValues (of course those arent real methods).  Thank you for your help!</p>
  
  <p>Edit: What I have done so far:</p>
  
  <p>I want to pass the data from MainFeedTableViewController to MainFeedViewController (The first is in a container inside of the second). I want to set the title of the custom navigation bar in MainFeedViewController to something described in the MainFeedTableViewController.</p>
  
  <p>In the MainFeedTableViewController.m (the view sending data) I have: </p>
  
  <pre><code>#import "MainFeedTableViewController.h"
  #import "FeedViewController.h"
  
  @interface MainFeedTableViewController ()
  
  @end
  
  @implementation MainFeedTableViewController
  
  - (IBAction)swipeLeftDetected:(UIGestureRecognizer *)sender {
      UIStoryboard *mc = self.storyboard;
      FeedViewController *fv = [mc instantiateViewControllerWithIdentifier:@"FeedViewController"];
      fv.navigationBarTitleToSet = @"HOPING TO SET TITLE TO THIS";
      [self performSegueWithIdentifier:@"MainToLocalFeed" sender:self];
  }
  and some other unrelated stuff..
  </code></pre>
  
  <p>In the MainFeedTableViewController.h I have:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface MainFeedTableViewController : UITableViewController
  
  @end
  </code></pre>
  
  <p>In the MainFeedViewController.m (the one receiving the data) I have:</p>
  
  <pre><code>#import "FeedViewController.h"
  
  @interface FeedViewController () &lt;UINavigationBarDelegate&gt;
  @property (weak, nonatomic) IBOutlet UINavigationBar *navigationBar;
  
  @end
  
  @implementation FeedViewController
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  }
  
  - (void)setNavigationBarTitle:(NSString *)navigationBarTitle{
      self.navigationItem.title = navigationBarTitle;
  }
  </code></pre>
  
  <p>And in the MainFeedViewController.h I have:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface FeedViewController : UIViewController
  
  @property NSString *navigationBarTitleToSet;
  
  @end
  </code></pre>
  
  <p>I want to run the setNavigationBarTitle method with either data from the .h (navigationBarTitleToSet) or just from the sending view controller, if possible to run a method with delegation. Thanks a ton and I hope this is possible :)</p>