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

531 questions
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
  • 8,533
  • 18
  • 82
  • 153
7
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
  • 36,864
  • 20
  • 113
  • 130
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
3 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
  • 693
  • 1
  • 7
  • 22
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
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
  • 5,675
  • 8
  • 45
  • 76
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,…
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
  • 551
  • 10
  • 25
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,136
  • 4
  • 23
  • 42
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
  • 41,555
  • 51
  • 213
  • 379
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…
4
votes
5 answers

Swipe gesture interrupts UISlider control in iOS 13, but not previous iOS versions

Note: This is the iOS 13 beta, but also could apply to the official release tomorrow. Update 2: I replaced it with a larger thumb image, and I'm still having a problem. Update: It looks like it still controls continuously if I'm super precise…
Chewie The Chorkie
  • 3,401
  • 4
  • 37
  • 77
4
votes
3 answers

ios PDFKit displaymode = singlepage only shows the first page of the pdf

I'm trying to display a pdf on ios via apples PDFKit library, and rather than use PDFDisplayMode.singlePageContinuous mode, I want to stop at page breaks so I'm trying to use PDFDisplayMode.singlePage.…
4
votes
1 answer

UISwipeGestureRecognizer doesn't recognize swipe gesture initiated outside the view

func addSwipe() { self.isUserInteractionEnabled = true let directions: [UISwipeGestureRecognizerDirection] = [.right, .left] for direction in directions { let gesture = UISwipeGestureRecognizer(target: self, action:…
zs2020
  • 52,221
  • 27
  • 148
  • 209
1
2
3
35 36