title: Reload data in table view from another table
body: <p>I have two tables . Table 1 is the principal table. When i select a row form table 2 i want to change the content of table 1 .</p>
  
  <p>This is what i was trying , but without effect. I can see that my array (stories) is changing but the table is not reload .</p>
  
  <pre><code>-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  
  
      if (tableView.tag==0)
      {
          static NSString *CellIdentifier1 = @"Cell1";
  
          UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
          if (cell == nil)
          {
              cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] ;
          }
  
          int storyIndex = [indexPath indexAtPosition: [indexPath length]];
  
  
  
          cell.textLabel.text =[[stories objectAtIndex: indexPath.row] objectForKey: @"title"];
          cell.textLabel.font=cell.textLabel.font = [UIFont systemFontOfSize:14]; //Change this value to adjust size
  
          NSString *uppercase = [cell.textLabel.text capitalizedString];
  
  
          cell.textLabel.text =  uppercase;
          return cell;
      }
      else
      {
          static NSString *CellIdentifier2 = @"Cell2";
  
          UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier2];
          if (cell == nil)
          {
              cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier2] ;
          }
  
          cell.textLabel.text = [categoryArray objectAtIndex:indexPath.row];
          return cell;
      }
  }
  
  
      - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  
      if (!tableView.tag==0) {
          title.text=[categoryArray objectAtIndex:indexPath.row];
          [stories removeAllObjects];
          NSString * path =[feeds objectAtIndex:indexPath.row];
          [self parseXMLFileAtURL:path];
          [tableView reloadData];
  
  
  
      }
  
  }
  
  
  
  
  - (void)parseXMLFileAtURL:(NSString *)URL
  {
      //stories = [[NSMutableArray alloc] init];
  
      //you must then convert the path to a proper NSURL or it won't work
      NSURL *xmlURL = [NSURL URLWithString:URL];
  
      // here, for some reason you have to use NSClassFromString when trying to alloc NSXMLParser, otherwise you will get an object not found error
      // this may be necessary only for the toolchain
      rssParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL];
  
      // Set self as the delegate of the parser so that it will receive the parser delegate methods callbacks.
      [rssParser setDelegate:self];
  
      // Depending on the XML document you're parsing, you may want to enable these features of NSXMLParser.
      [rssParser setShouldProcessNamespaces:NO];
      [rssParser setShouldReportNamespacePrefixes:NO];
      [rssParser setShouldResolveExternalEntities:NO];
  
      [rssParser parse];
  
      if (!tableView.tag==0) {
  
          [tableView reloadData];
      }
  
  
  }
  </code></pre>