YFJLeftSwipeDeleteTableView 0.0.1

YFJLeftSwipeDeleteTableView 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total613
Week0
Month0

Installs

Apps25
Test Targets1
powered by Segment

GitHub

Stars64
Watchers6
Forks12
Issues3
Contributors1
Pull Requests1

Code

Files2
LOCLines of Code 131



  • By
  • yfujiki

Drop-in UITableView subclass that supports left-swipe cell deletion like in iOS7. (works both in iOS6 and iOS7)

Just grab YFJLeftSwipeDeleteTableView.(h|m) and drop in your project. You have to specify following methods in the datasource methods, but that is it.

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Since you do not want stock delete button to appear, return NO here.
    return NO;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    // Operation to do when you delete cell.
    // e.g., delete item from datasource, call [UITableView deleteRowAtIndexPaths:withRowAnimation].
}

It will give you left-swipe delete button like in iOS7 both for iOS6&7.