Skip to content

guidosette/GFTableViewRowAction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GFTableViewRowAction

Custom TableViewRowAction

Alt Text

How to use:

  • add #import "GFTableViewRowAction.h" in TableViewController

Example:
// custom UITableViewRowAction
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
float heightCell = [self tableView:tableView heightForRowAtIndexPath:indexPath];

GFTableViewRowAction* actionDelete = [GFTableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Delete" textColor:[UIColor redColor] backgroundColor:[UIColor whiteColor] icon:[UIImage imageNamed:@"delete"] heightCell:heightCell handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
NSLog(@"Delete action");
}];

GFTableViewRowAction* actionAttach = [GFTableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Attach" textColor:[UIColor blueColor] backgroundColor:[UIColor greenColor] icon:[UIImage imageNamed:@"attach"] heightCell:heightCell handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
NSLog(@"Attach action");
}];

return @[actionDelete, actionAttach];
}

About

Custom TableViewRowAction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published