zoukankan      html  css  js  c++  java
  • nsmutalbe select

    - (void) setEditing:(BOOL)editting animated:(BOOL)animated

    {

        [self.tableViewsetEditing:editting animated:YES];

        [self.tableViewsetMultipleTouchEnabled:YES];

       // [self.tableView setEditing:editting animated:YES];

    }


    viewdidload()

      self.tableView.allowsSelectionDuringEditing = YES;

        self.tableView.allowsMultipleSelection = YES;

        self.tableView.allowsMultipleSelectionDuringEditing = YES;



    //select all row

    -(IBAction)selectAll:(id)sender

    {


        UIButton *btn = (UIButton *)sender;

        if (btn.tag == 0) {

            for (int i =0; i<5; i++) {

                NSIndexPath *myindexPath = [NSIndexPathindexPathForRow:i inSection:0];

                [self.tableViewselectRowAtIndexPath:myindexPath animated:YESscrollPosition:UITableViewScrollPositionNone];

            }

            btn.tag = 1;

        }else{

            for (int i =0; i<5; i++) {

                NSIndexPath *myindexPath = [NSIndexPathindexPathForRow:i inSection:0];

                [self.tableViewdeselectRowAtIndexPath:myindexPath animated:YES];

                

            }

            btn.tag = 0;

            

        }


      

    }


  • 相关阅读:
    redis 下载安装
    Docker之网络
    容器与镜像
    Docker之容器
    Docker之镜像
    在安装完windows和linux双系统后,删除BIOS中的引导启动项在Window下
    Ububtu 18.04中如何在火狐浏览器中安装flash插件
    lambda 表达式
    IDEA DeBug mode
    spring 系统启动加载的类
  • 原文地址:https://www.cnblogs.com/guligei/p/9029246.html
Copyright © 2011-2022 走看看