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;

            

        }


      

    }


  • 相关阅读:
    v-date
    文字在图片上
    v-生命周期
    彭博接口分类
    如何指定vim 的查找是从上往下还是从下往上[z]
    查看linux版本
    git web找不到new project解决方法
    比特币运行原理[z]
    [Z]haproxy+keepalived高可用群集
    blockchain good article
  • 原文地址:https://www.cnblogs.com/guligei/p/9029246.html
Copyright © 2011-2022 走看看