UITableView側滑效果(1)
阿新 • • 發佈:2017-06-29
src tin mage sar png standard alua order eva action, NSIndexPath *indexPath) {
//側滑
-(NSArray )tableView:(UITableView )tableView editActionsForRowAtIndexPath:(NSIndexPath )indexPath{
NSStringindexPathRow = [NSString stringWithFormat:@"%ld",(long)indexPath.row];
[[NSUserDefaults standardUserDefaults]setObject:indexPathRow forKey:@"indexPathRow"];
//確認訂單
UITableViewRowAction confirmOrder = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@" " handler:^(UITableViewRowAction
//自己需要實現的其他功能
}];
//取消訂單
UITableViewRowAction *cancelOrder = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@" " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
//自己需要實現的其他功能
}];
//評價
UITableViewRowAction *evaluateOrder = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@" " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
//自己需要實現的其他功能
}];
//查看訂單
UITableViewRowAction *seeOrder = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@" " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
//自己需要實現的其他功能
}];
return @[seeOrder,evaluateOrder,cancelOrder,confirmOrder];
}
UITableView側滑效果(1)