title: How Passing indexPath.row between views?
body: <p>I have table view, and I want to send the indexPath.row(index of selected row) to another view. </p>
  
  <h2>ProfesorViewController.m</h2>
  
  <pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  {
      SCProfesoresCellTableViewCell *cell = (SCProfesoresCellTableViewCell *)[tableView cellForRowAtIndexPath:indexPath];
  
  rowselected = indexPath.row;
  
  }
  </code></pre>
  
  <h2>ProfesorViewController.h</h2>
  
  <pre><code>@interface ProfesorViewController : UIViewController &lt;UITableViewDataSource, UITableViewDelegate&gt;
  
  @property long rowselected;
  
  @end
  </code></pre>
  
  <p>I want to receive value of <code>rowselected</code> variable: </p>
  
  <h2>ProfesorDetailViewController.m</h2>
  
  <pre><code>@synthesize rowselected;
  
  - (void)viewDidLoad {
  
      NSLog(@"BANDERA DE LA FILA %ld", rowselected);
  }
  </code></pre>
  
  <h2>ProfesorDetailViewController.h</h2>
  
  <pre><code>@interface ProfesorDetailViewController : UIViewController
  @property long rowselected;
  @end
  </code></pre>
  
  <p>But the value of <code>rowselected</code> is always 0. 
  I don't know how to send the value of variable. </p>