• 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:  }
  • 相关阅读:
    Cloudera Manager 4.6 安装部署hadoop CDH集群
    linux下统计目录下所有子目录的大小
    jvisualvm远程监控tomcat
    安装ubuntu server时可能会需要的配置
    安装配置maven私服-nexus
    maven环境配置
    各版本eclipse的maven配置
    转载:Centos7 从零编译Nginx+PHP+MySql 序言 一
    MongoDB系列一:CentOS7.2下安装mongoDB3.2.8
    MongoDB Windows环境安装及配置
  • 原文地址:https://www.cnblogs.com/zeyang/p/4457956.html
Copyright © 2020-2023  润新知