UITableView侧滑效果(1)
2017-06-29 17:38 jhs_哈哈 阅读(363) 评论(1) 编辑 收藏 举报//侧滑
-(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 action, NSIndexPath *indexPath) {
//自己需要实现的其他功能
}];
//取消订单
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];
}