zoukankan      html  css  js  c++  java
  • 给button添加长按手势并侦测到此button


    1, 添加手势

     self.longPressRecognizer = [[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(handleLongPress:)];
    [btn addGestureRecognizer:self.longPressRecognizer];

    2,得到当前执行长点选的button

    - (void)handleLongPress:(UILongPressGestureRecognizer *)recognizer

        UIButton *btn = (UIButton *)recognizer.view;

  • 相关阅读:
    Uva
    Uva
    Uva
    Uva
    Uva
    Uva
    Uva
    Uva
    第二次结队编程作业
    第三次软件工程作业的总结
  • 原文地址:https://www.cnblogs.com/lisa090818/p/3816167.html
Copyright © 2011-2022 走看看