xulewin
4/16/2018 - 1:41 AM

实例化长按手势监听

实例化长按手势监听

    //实例化长按手势监听
    UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(btnLong:)];
    
    //代理
    longPress.delegate = self;
    longPress.minimumPressDuration = 0.5;
    
    [self.label_num addGestureRecognizer:longPress];