title: iOS: Passing object to custom UITableViewCell to UIViewController via a button action on cell
body: <p>I have a custom <code>UITableViewCell</code>, which have a button on it, IB linked to a function called:</p>
  
  <pre><code>- (IBAction)clickUse:(id)sender;
  </code></pre>
  
  <p>In this function, I planned to pass an object from <code>UITableView</code>'s data source (an object in a <code>NSMutableArray</code>) to next <code>UIViewController</code>, when the user clicks the button on the <code>UITableViewCell</code>.</p>
  
  <p>I set a property in the custom <code>UITableViewCell</code>, like this:</p>
  
  <pre><code>@property (nonatomic, retain) SomeObject *some_object;
  </code></pre>
  
  <p>In <code>UITableView</code>'s <code>cellForRowAtIndexPath</code> function, I pass the object to the cell:</p>
  
  <pre><code>MyCustomCell *cell = (MyCustomCell *)[tableView dequeueReusableCellWithIdentifier:identifier];
  cell.some_object = [self.cellData objectAtIndex:indexPath.row];
  </code></pre>
  
  <p>At this moment I track the object, it's still here. But in the <code>MyCustomCell</code> cell, the object is gone and assigned to <code>nil</code>. Therefore, the object cannot be passed to next <code>UIViewController</code>.</p>
  
  <p>What did I miss?</p>