1. 程式人生 > >UITableView側滑效果(1)

UITableView側滑效果(1)

src tin mage sar png standard alua order eva

//側滑
-(NSArray )tableView:(UITableView )tableView editActionsForRowAtIndexPath:(NSIndexPath )indexPath{
NSString
indexPathRow = [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];

}技術分享

UITableView側滑效果(1)