Questions tagged [uiswipegesturerecognizer]

UISwipeGestureRecognizer is a concrete subclass of UIGestureRecognizer that looks for swiping gestures in one or more directions. A swipe is a discrete gesture, and thus the associated action message is sent only once per gesture.

UISwipeGestureRecognizer recognizes a swipe when the specified number of touches (numberOfTouchesRequired) have moved mostly in an allowable direction (direction) far enough to be considered a swipe. Swipes can be slow or fast. A slow swipe requires high directional precision but a small distance; a fast swipe requires low directional precision but a large distance.

You may determine the location where a swipe began by calling the UIGestureRecognizer methods locationInView: and locationOfTouch:inView:. The former method gives you the centroid if more than one touch was involved in the gesture; the latter gives the location of a particular touch.

Whole document - UISwipeGestureRecognizer

537 questions
3
votes
5 answers

UISwipeGestureRecognizerDirection issue

In viewDidLoad I set: UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)]; [swipeGesture setDirection:(UISwipeGestureRecognizerDirectionLeft |…
Paul T.
  • 4,938
  • 7
  • 45
  • 93
3
votes
5 answers

Couldn't get UISwipeGestureRecognizer direction correctly

I'm writing code to move my two fingers up or down on a view to change some status. The code as below: UISwipeGestureRecognizer *aSwipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeGesture:)]; [aSwipeGesture…
3
votes
1 answer

How to implement a swipe and hold gesture recognizer?

I have two gesture recognizers that recognize a swipe right gesture and a long press gesture. I tried to use the delegate method gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer: but whenever I perform the swipe and long press…
3
votes
1 answer

custom swipe method for iOS?

How can I show all content from my tableview or my core data in another view controller with SWIPE METHOD for iOS? Well this time I need to know how I can show all content or all object class from my core data entity. To better understand its like…
3
votes
1 answer

Adding a UIGestureRecognizer to a UITableViewCell

I used http://www.raywenderlich.com/21842/how-to-make-a-gesture-driven-to-do-list-app-part-13 to add a gesture recognizer to my cells, so that i can move them from left to right, but i get this error: [UISwipeGestureRecognizer translationInView:]:…
2
votes
2 answers

Slide through view controllers but not with the UISwipeGestureRecognizer

Here is my issue, i got 5 view controllers and i can switch between them trough swipe with the UISwipeGestureRecognizer class and xcode's storyboard. So this works, but, i dont like the slide effect. I like to make it in a way so you can exactly…
Joey
  • 645
  • 5
  • 19
2
votes
0 answers

How to use UIScrollView with ViewControllers from Storyboard

How would I use a UIScroll view (much like the main iPhone screen) with the page control at the bottom, pass UIViewControllers? I have three UIViewControllers,that I would like the user to swipe back and forth. However these are already created in…
2
votes
2 answers

UISwipeGestureRecognizerDirectionRight NOT working inside DetailViewController.m with iOS 5.1

this is my first question, but i use this site a lot this last months (thanks for all). My problem: i have a split-view project for i-Pad. In the DetailViewController I use a UIButton. Here's some code from DetailViewController.h: @property (strong,…
2
votes
1 answer

how to use UISwipeGestureRecognizer in the project created by cocos2d?

i created a project by using cocos2d,and now i want to use UISwipeGestureRecognizer for get the up/down/left/right, so how can i do? thanks a lot
DaPo
  • 113
  • 1
  • 8
2
votes
1 answer

Swipe Gesture to slide UIViews

I want to do swipe gesture to slide the UIView continuously and getting data from it. Consider each word in each UIView. I stored data in an array and printed in label of UIView while transition. But when I try to swipe after shown all data program…
Dinesh Raja
  • 8,501
  • 5
  • 42
  • 81
2
votes
2 answers

Gesture error in uitableview cells

i have a problem with my GestureRecognizer in UITableViewCell,i have swipe-left and right Gesture, tap-hold for 2 second and pinch Gesture in tableview cell, Swipe-right for next chapter, swipe left for previous chapter,pinch for redirecting to…
2
votes
2 answers

ios UISwipeGestureRecognizer calculate offset

I'm adding swipe gesture recognizer to my application - (void)createGestureRecognizers { //adding swipe up gesture UISwipeGestureRecognizer *swipeUpGesture= [[UISwipeGestureRecognizer alloc] initWithTarget:self…
Oleg
  • 1,383
  • 4
  • 19
  • 35
2
votes
1 answer

UISwipeGestureRecognizer on UIImageview inside UIView detecting wrong swipe?

I am having problem with detecting swipe on UIImageView which is inside self.view. When I apply UISwipeGestureRecognizer on self.view it works fine, but when i try to apply same on UIImageview it detects wrong swipe direction. Code: { //Swipe…
Pratik Mistry
  • 2,905
  • 1
  • 22
  • 35
2
votes
2 answers

UISwipeGestureRecognizer selector not called. Any idea why?

I'm using the code below to integrate right/left swipe events to a UIImageView object (called photo_view) but it did not work after tests in iphone simulator and device. The methods handleLeftSwipe and handleRightSwipe below are not even called as…
Stephane
  • 4,978
  • 9
  • 51
  • 86
2
votes
1 answer

UISwipeGestureRecognizer Not Getting Added To View

I'm trying to add a swipe gesture recognizer to my view. Here's a snippet of code from my viewDidLoad()method of the main view controller file: self.view.addGestureRecognizer(UISwipeGestureRecognizer(target: self, action:…
nicog
  • 102
  • 9