title: Moving cells to bottom of UITableView when swiped right with animation effect
body: <p>I am trying to implement swipe gestures on the UITableviewCells, so when the user swipes to right I want the cell to move to the bottom of the table with animation effect (<strong>just like CLEAR app in iphone</strong>). I have referred this link  <a href="http://www.cocoacontrols.com/platforms/ios/controls/jtgesturebasedtableviewdemo" rel="nofollow">http://www.cocoacontrols.com/platforms/ios/controls/jtgesturebasedtableviewdemo</a>, and trying to implement it. below is my code which I have tried so far when the state is "right"</p>
  
  <pre><code>- (void)gestureRecognizer:(JTTableViewGestureRecognizer *)gestureRecognizer commitEditingState:(JTTableViewCellEditingState)state forRowAtIndexPath:(NSIndexPath *)indexPath 
    {
      UITableView *tableView = gestureRecognizer.tableView;
  
      [tableView beginUpdates];
  
      if (state == JTTableViewCellEditingStateLeft) 
      {
          // An example to discard the cell at JTTableViewCellEditingStateLeft
          [self.rows removeObjectAtIndex:indexPath.row];
          [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationLeft];
      }
      else if (state == JTTableViewCellEditingStateRight)
      {       
  
          ***NSString *selectedString = [self.rows objectAtIndex:indexPath.row];     
  
          [self.rows removeObjectAtIndex:indexPath.row];
          //[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
          //                 withRowAnimation:UITableViewRowAnimationLeft]; 
  
         NSIndexPath *selectedIndexPath = [tableView indexPathForSelectedRow];
  
         [tableView moveRowAtIndexPath:selectedIndexPath toIndexPath:[NSIndexPath        indexPathForRow:[self.rows count]-1 inSection:0]];          
  
          [self.rows insertObject:selectedString atIndex:[self.rows count]];        
          [tableView insertRowsAtIndexPaths:[NSArray
                                             arrayWithObject:[NSIndexPath indexPathForRow:0 inSection:0]]
                           withRowAnimation:UITableViewRowAnimationBottom];
  
          [tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationLeft];*** 
      } 
  
      [tableView endUpdates];
  
      // Row color needs update after datasource changes, reload it.
      [tableView performSelector:@selector(reloadVisibleRowsExceptIndexPath:) withObject:indexPath afterDelay:JTTableViewRowAnimationDuration];
  }
  </code></pre>
  
  <p>So as you can see when the state is right I am trying to implement it but I am not understanding how to have a animation effect. So friends, I request to please go through this code and help me out.</p>
  
  <p>Regards
  Ranjit</p>