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:  }
  • 相关阅读:
    A1039 Course List for Student (25 分)
    A1101 Quick Sort (25 分)
    日常笔记6C++标准模板库(STL)用法介绍实例
    A1093 Count PAT's (25 分)
    A1029 Median (25 分)
    A1089 Insert or Merge (25 分)
    A1044 Shopping in Mars (25 分)
    js 验证
    根据string获取对应类型的对应属性
    HTML 只能输入数字
  • 原文地址:https://www.cnblogs.com/zeyang/p/4457956.html
Copyright © 2011-2022 走看看