我怎样才能获得UILongPressGestureRecognizer
uilabel。当我实现以下代码时,它不会调用该函数。所以请告诉我我做错了什么?
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(LabelLongPressed:)];
longPress.minimumPressDuration = 0.5; // Seconds
longPress.numberOfTapsRequired = 0;
[objlblDuplicate addGestureRecognizer:longPress];
[longPress release];