Long press on UITableView
I would like to handle a long press on a UITableViewCell to print a “quick access menu”. Did someone already do this? Particularly the gesture recognize on UITableView? 10 Answers 10
I would like to handle a long press on a UITableViewCell to print a “quick access menu”. Did someone already do this? Particularly the gesture recognize on UITableView? 10 Answers 10
I am detecting if the user has pressed down for 2 seconds: UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPress:)]; longPress.minimumPressDuration = 2.0; [self addGestureRecognizer:longPress]; [longPress release]; This is how I handle the long press: -(void)handleLongPress:(UILongPressGestureRecognizer*)recognizer{ NSLog(@”double oo”); } The text “double oo” gets printed twice when I press down for longer than 2 seconds. Why … Read more
I want my app to recognize when a user swipes from right to left on the phone screen. How to do this? 22 s 22 OnSwipeTouchListener.java: import android.content.Context; import android.view.GestureDetector; import android.view.GestureDetector.SimpleOnGestureListener; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class OnSwipeTouchListener implements OnTouchListener { private final GestureDetector gestureDetector; public OnSwipeTouchListener (Context ctx){ gestureDetector = new … Read more
I want to get fling gesture detection working in my Android application. What I have is a GridLayout that contains 9 ImageViews. The source can be found here: Romain Guys’s Grid Layout. That file I take is from Romain Guy’s Photostream application and has only been slightly adapted. For the simple click situation I need … Read more