I want to implement right-to-left and left-to-right gestures on a view that inherits from UITableViewController. I have the code for the gestures implemented in another view (UIViewController) and it works.
It does't seem like touchesBegan
is even getting called.
Does anyone know know to do this?
Thanks
-
It depends on the SDK version. In 3.2, use
UIGestureRecognizer
. Prior to 3.2 usetouchesBegan
and friends. This is especially true when dealing with aUIScrollView
becauseUIGestureRecognizer
will canceltouchesBegan
. So if you want to be forwards and backwards compatible you have to do both with a UIScrollView.For your particular case, use
UISwipeGestureRecognizer
orUIPanGestureRecognizer
. You will have to implementgestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:
to prevent the UIScrollView from canceling your gesture recognizers.UITableViewController -> UITableView : UIScrollView
mea36 : I'm running 3.1.2, do you know where I can get 3.2?mea36 : Or is there any way to do this without the gestureRecognizer?David Dunham : You can get 3.2 by buying an iPad. Or wait a few days for 4.0…
0 comments:
Post a Comment