Possible Duplicate:
UIButton long press with finger stationary
I have created 100 buttons from code. Now I want to react on long button press. For each buttons I call enxt code:
UILongPressGestureRecognizer *longPressGesture = [[[UILongPressGestureRecognizer alloc]
initWithTarget:self
action:@selector(longPress:)]
autorelease];
[longPressGesture setMinimumPressDuration:1];
[button addGestureRecognizer:longPressGesture];
[self.view addSubview:button];
But longPress
method was not called.
Does anybody know why?