If you have a custom cell, add a property to it:
@property (strong, nonatomic) NSIndexPath *indexPath;
and set it when you return the cell for display. Now the cell has access to the required information.
Aside:
Not that you're going to use it any more, but don't do this:
NSIndexPath *indexPath = [[NSIndexPath alloc] init];
indexPath = [self.tableView indexPathForCell: UNKNOWN CELL PARAMETER];
because creating an instance just to destroy it in the next statement is wasteful