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:  }
  • 相关阅读:
    mysql前缀索引的应用
    记博客园
    好的博客网站(随手记)
    memcache应对缓存失效问题
    memcache内存分配问题
    memcached使用libevent 和 多线程模式
    RabbitMQ用户及权限控制
    Nginx基础之常用配置
    PHP-fpm进程池优化方法
    php-fpm参数详解
  • 原文地址:https://www.cnblogs.com/zeyang/p/4457956.html
Copyright © 2011-2022 走看看