zoukankan      html  css  js  c++  java
  • iOS开发——给ImageView添加点击事件

    给ImageView添加点击事件

       1:  cell.pictureView.userInteractionEnabled = YES;
       2:      UITapGestureRecognizer *gr = [[UITapGestureRecognizer alloc]initWithTarget:cell action:@selector(displayPicture:)];
       3:      gr.numberOfTapsRequired = 1;
       4:      gr.numberOfTouchesRequired = 1;
       5:   [cell.pictureView addGestureRecognizer:gr ];
       1:  -(void)displayPicture:(UITapGestureRecognizer*)gr{
       2:      NSLog(@"%s----%@",__func__,gr);
       3:      [self.delegate displayPic:self.pictureView.image];
       4:  }
  • 相关阅读:
    数组中的每一个对象执行一次方法:makeObjectsPerformSelector
    $.each() each
    JQ js选择节点操作
    Sublime Text 3 快捷键
    TotoiseSVN的基本使用方法
    Hbuilder快捷键
    获取网页内容区域各种高/宽汇总
    TP操作
    xhr接收php://output的二进制文件,并转换成excel表格
    Go语言的%d,%p,%v等占位符的使用
  • 原文地址:https://www.cnblogs.com/zeyang/p/4457956.html
Copyright © 2011-2022 走看看