zoukankan      html  css  js  c++  java
  • 自定义cell侧滑删除

    - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { 

        return YES;

    }

    // 自定义左滑显示编辑按钮
    -(NSArray<UITableViewRowAction*>*)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        
        UITableViewRowAction *rowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault
                                                                             title:@"跟进" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
                                                                                 NSLog(@"跟进");
                                                                                 
                                                                             }];
        
        UITableViewRowAction *rowActionSec = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault
                                                                                title:@"快速备忘"    handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
                                                                                    NSLog(@"快速备忘");
                                                                                    
                                                                                }];
        rowActionSec.backgroundColor = [UIColor colorWithHexString:@"f38202"];
        rowAction.backgroundColor = [UIColor colorWithHexString:@"d9d9d9"];
        
        NSArray *arr = @[rowAction,rowActionSec];
        return arr;
    }

  • 相关阅读:
    MongoDB_聚合
    MongoDB_基本操作
    MongoDB_"Error parsing YAML config file: yaml-cpp: error at line 3, column 9: illegal map value"解决方法
    MongoDB_安装
    beautifulsoup模块
    python发送邮件
    selenium常用操作
    selenium元素定位
    requests模块的高级用法
    继承
  • 原文地址:https://www.cnblogs.com/lyz0925/p/6097619.html
Copyright © 2011-2022 走看看