小编Vic*_*cky的帖子

UILabel UILongPressGestureRecognizer无法正常工作?

我怎样才能获得UILongPressGestureRecognizeruilabel.当我实现以下代码时,它不会调用该函数.请告诉我,我做错了什么?

UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc]      initWithTarget:self action:@selector(LabelLongPressed:)];
longPress.minimumPressDuration = 0.5;  // Seconds
longPress.numberOfTapsRequired = 0;

[objlblDuplicate addGestureRecognizer:longPress];
[longPress release];
Run Code Online (Sandbox Code Playgroud)

iphone uibutton uigesturerecognizer ios

4
推荐指数
1
解决办法
3441
查看次数

标签 统计

ios ×1

iphone ×1

uibutton ×1

uigesturerecognizer ×1