ios - UITableViewCell custom edit content -
While editing my cells, I would prefer not only to delete buttons, but also to others what the real way of doing so is? I own after you try this code UIView
editingAccessoryView property but being the object of the problem (ie navigation, click the Edit button in the address bar) and the whole scene appears only on direct editing Also the way of trying to make ignored swipes across a cell
tableView: editActionsForRowAtIndexPath: method had been tried, but did not work, at least I figure out what I Want your work Did not manage to get. Thank you in advance
- (NSArray Table view: (UITableView *) table view editActionForRoundAandPepath: (NSIndexPath *) IndexedPath {UITableViewRowAction * button = [UITableViewRowAction lineActionWithStyle: UITableViewRowActionStyleDefault Title: @ "Button1" Handler: ^ (UITableViewRowAction * Action, NSIndexPath * indexPath) {NSLog (@ "Action to perform with button 1"); }]; button. Background color = [UIColor greenColor]; // arbitrary color UITableViewRowAction * Button2 = [UITableViewRowAction rowActionWithStyle: UITableViewRowActionStyleDefault Title: @ "button 2" handler: ^ (UITableViewRowAction * action, NSIndexPath * indexPath) {NSLog (@ "! To perform with Button2 action"); }]; Button2.backgroundColor = [UIColor blueColor]; // arbitrary color refraction @ [button, button 2]; You want // array 1,2,3 with all the buttons, etc ...} - (void) tableView: (UITableView *) tableView commitEditingStyle: (UITableViewCellEditingStyle) editingStyle forRowAtIndexPath: (NSIndexPath *) indexPath {// This method the need to apply or will not do anything:} - (bool) tableView: (UITableView *) tableView canEditRowAtIndexPath: (NSIndexPath *) indexPath {return YES; // tableview should be editable or nothing will work ...}
Comments
Post a Comment