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
7
votes
1 answer

Recognize two fingers swipe down gesture in UITableView

I want to add two fingers swipe up and down gestures in UITableView. The idea is to scroll through the cells using one finger pan gesture and do some other action by using two fingers swipe up/down gestures. I'd like to achieve a similar experience…
7
votes
2 answers

Use interactivepopgesturerecognizer with CollectionView with horizontal scroll when navigation bar is hidden

i'm trying to use the interactivepopgesturerecognizer to go back in a view in which i have also a UICollectionView with horizontal scrolling, and the problem is that in the frame of the collection view the swipe to go back doesn't work, but works…
Piero
  • 9,173
  • 18
  • 90
  • 160
7
votes
1 answer

Increase Pages After Each Swipe Objective-C

I have one UIViewController and inside it I have 3 UIWebView. I added swipe left to my webViews programatically. Right now I can swipe, but just 3 pages and then repeat again. I want to increase my currentPage and add this to my webView3, but I…
jason
  • 98
  • 7
6
votes
3 answers

Unexpected nil index path in _shouldShowMenuForCell

Does anyone know what is going on with this problem? My cell stop swiping because of this. [Assert] Unexpected nil index path in _shouldShowMenuForCell:, this should never happen. Cell ; baseClass = UITableViewCell; frame = (0 97.5; 375 130);…
Piotr
  • 101
  • 7
6
votes
4 answers

UISwipeGestureRecognizer only one direction working

So Im making a page with pageControl (it's a page with multiple views with dots indicating which page you're in), my code looks like the following in viewDidLoad: UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc]initWithTarget:self…
ddolce
  • 739
  • 2
  • 10
  • 30
6
votes
1 answer

Xcode: How do I change UIPageControl value with swipe gesture?

I have a quick question I was hoping you guys could help me answer. Right now I have a UIPageControl in a storyboard which changes an image depending on what dot you are on, however, as of now you have to press on the dot to change through the…
6
votes
1 answer

Preload next page in UIPageViewController

I've looked many, many places and have yet to find some good sample code showing how to pre-load the "next" page in a UIPageViewController. There are a few answers on SO detailing some theoretical ways to do it (see this question) but no one has…
DiscDev
  • 38,652
  • 20
  • 117
  • 133
6
votes
3 answers

Swipe Gesture Recognition Inside UIWebView

I have read a bunch of questions on this but none of them seem to achieve what I am looking for... So lets say I have an arbitrary UIWebView inside of a UIViewController. The UIViewController has a SwipeGestureRecognizer that works fine. It even…
MrHappyAsthma
  • 6,332
  • 9
  • 48
  • 78
5
votes
2 answers

UISwipeGestureRecognizer animation

I'm trying to implement an UISwipeGestureRecognizer in my collectionViewCell, so when you swipe to the left, the cell disappear. What i'm trying to implement (i can't find a way to do it) is to animate the swipe, so when i swipe the cell to the…
5
votes
3 answers

Swipe vertical gesture not working with UITableView

I have UIViewController and I have added a UITableView to it in the storyboard, later I added a swipe Up gesture recognizer to the view, but nothing happened. this is my code import UIKit class ViewController: UIViewController,…
MEH
  • 1,777
  • 3
  • 15
  • 34
5
votes
1 answer

Swift - UISwipeGestureRecognizer Within UIScrollView

I believe I found a solution but it's in Obj-C and I'm completely new & confused into interpreting this into Swift: Horizontal UISwipeGestureRecognizer in subview of UIScrollView ? (UIScrollView only needs to recognize vertical scrolling) I have my…
theflarenet
  • 642
  • 2
  • 13
  • 27
5
votes
1 answer

How to use pan gesture and a swipe gesture alternatively on the same view?

I have a view that contains a counter. I have implemented two different gesture recognizers, a UISwipeGesture to increase the count by one, and a UIPanGesture in order to increase the count by multiple numbers every time the user swipes up. Both…
5
votes
4 answers

Swipe back and forth through array of images Swift

I have an array of images that I want to be able to swipe forward (left) to the next image, or back (right) to the previous image. When the imageList hits -1/out of range, the app crashes. I'm having trouble of figuring out the logic of how to keep…
Lukesivi
  • 2,206
  • 4
  • 25
  • 43
4
votes
3 answers

How to gently drag panel from offscreen like JetBlue iPhone app

I'm looking for a way to slide a partially concealed tool panel from off screen like the JetBlue iPhone app does. I know how to do this with regular swipe gesture recognizers, but that app has a certain threshold, after which the panel "snaps" to…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
4
votes
1 answer

tableView:didSelectRowAtIndexPath not firing after swipe gesture is called

This is a localized issue. I'm going to post a lot of code, and provide a lot of explanation. Hopefully... someone can help me with this. In my application I have a "Facebook-style" menu. The iOS Facebook app, to be more specific. You can access…
1
2
3
35 36