And*_*rew 2 iphone objective-c uibutton
我想知道如何检测我对UIButton的长按?我听说过UILongPressGestureRecognizer但我完全不确定如何使用它.
用这个:
UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(selectorname)];
[anyView addGestureRecognizer:longPressGesture];
[longPressGesture release];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1482 次 |
| 最近记录: |