2011-03-20 2 views

Répondre

3

Je ne suis pas sûr du UILongPressGestureRecognizer, mais vous pouvez commencer un NSTimer quand le bouton est frappé, et puis quand la minuterie s'éteint vérifier pour voir si elle est encore en panne.

7

Utilisez ceci:

UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(selectorname)]; 
[anyView addGestureRecognizer:longPressGesture]; 
[longPressGesture release]; 
+1

Cela n'offre pas un comportement correct souhaité sur un UIButton –

Questions connexes