IOS UIButton长按事件
2020-07-28 本文已影响0人
Fat_Blog
//按钮长按
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
//长按时间
longPress.minimumPressDuration = 0.8;
[titleButton addGestureRecognizer:longPress];