Returning UITableViewCell custom cell
<p>I have a subclass of <code>UITableViewCell</code> called <code>ReminderCell</code>.</p>

<p><code>ReminderCell</code> has a method called <code>backToPlaceAnimation</code> that I wrote.</p>

<p>The problem is for example if I want to call <code>backToPlaceAnimation</code> on the first <code>ReminderCell</code> from <code>RemindersVC</code> using <code>tableView: cellForRowAtIndexPath:</code> it's not returning the correct object (it's <code>UITableViewCell</code> object and not <code>ReminderCell</code> at all).</p>

<p>How can I get the correct object?</p>

<p>Code:</p>

<pre><code>NSIndexPath *cellIndexPath=[NSIndexPath indexPathWithIndex:0];

ReminderCell *cell=(ReminderCell*)[self tableView:self.AroundersTableView cellForRowAtIndexPath:cellIndexPath];

[cell cancelDeletion];
</code></pre>

<p>Crash log:</p>

<p><code>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid index path for use with UITableView.  Index paths passed to table view must contain exactly two indices specifying the section and row.  Please use the category on NSIndexPath in UITableView.h if possible.</code></p>

<p>cellForRowAtIndexPath: override:</p>

<pre><code>-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    //Creating a default cell using "cellIdentifier"(NSString)
    ReminderCell *cell=[tableView dequeueReusableCellWithIdentifier:@"Cell"];
    if (cell==nil) {
        cell=[[ReminderCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
    }
    //Changing "cell"'s "index" to indexPath.row
    cell.index=(int)indexPath.row; //Crashes here

    cell.textLabel.text=@"Hello";

    //Returning cell
    return cell;
}
</code></pre>

<p>Thank you!</p>