title: TableView does not update when I pass a string from another view
body: <p>I want to populate a UITableView by passing a string from a UIViewController to a UITableView.</p>
  
  <p>This is my code so far:</p>
  
  <p>UITableViewController.m</p>
  
  <pre><code>    - (void)viewDidLoad
      {
          [super viewDidLoad];
          NSMArray = [[NSMutableArray alloc]initWithObjects:@"text",@"text2", nil];
      }
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 1;
  }
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return NSMArray.count;
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
      if (cell == nil){
          cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier ];
      }
      cell.textLabel.text = [NSMArray objectAtIndex:indexPath.row];
      return cell;
  }
  
  - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
  {
      return YES;
  }
  
  - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
  {
      if (editingStyle == UITableViewCellEditingStyleDelete) {
          //remove fron NSMutableArray
          [NSMArray removeObjectAtIndex:indexPath.row];
          //delete from table
          [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationTop];
      }
  }
      -(void)getString:(NSString *)string
      {
          if ([make length] &gt; 0) {
  
              if (!NSMArray)
              {
                  NSMArray = [[NSMutableArray alloc]init];
              }
              [NSMArray insertObject:make atIndex:0];
              NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
              [self.myTableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
          }
      }
  </code></pre>
  
  <p>UITableViewController.h</p>
  
  <pre><code>    #import &lt;UIKit/UIKit.h&gt;
      #import "ViewController.h"
  
      @interface ViewController : UIViewController &lt;UITableViewDataSource, UITableViewDelegate&gt;
      @property (strong, nonatomic) IBOutlet UITableView *myTableView;
      @property (strong, nonatomic) NSMutableArray *NSMArray;
      -(void)getString:(NSString *)string;
  </code></pre>
  
  <p>ViewController.m</p>
  
  <pre><code>#import "entryViewController.h"
  
  @interface entryViewController ()
  
  @end
  
  @implementation entryViewController
  @synthesize textfieldString, myString;
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
      //Save button
      UIBarButtonItem *SaveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(pushCarMake:)];
      self.navigationItem.rightBarButtonItem = SaveButton;
  }
  
  - (void)pushCarMake:(id)sender
  {
  
      myString = textfieldString.text;
      ViewController *mainVC = [[ViewController alloc]init];
      [mainVC getString:myString];
      //pop to root ViewController
      [self.navigationController popToRootViewControllerAnimated:TRUE];
  
  }
  @end
  </code></pre>
  
  <p>ViewCotroller.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "ViewController.h"
  
  @interface entryViewController : UIViewController
  
  @property (strong, nonatomic) NSString *carMake;
  @property (strong, nonatomic) IBOutlet UITextField *textfieldCarMake;
  </code></pre>
  
  <p>So this works fine and populates the Table View with the string items instantiated in the viewDidLoad of the UITableViewCotroller. But every time I pass a string from the ViewControllers to the table View it does not go into the table. any suggestions why this is. Sorry for pasting so much code.</p>