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

how to add swipe gesture or swipe function between two overlap container view using segmented control, like instagram profile?

I am new to iOS and trying to build an app to learn more. I'm stuck at the last stage of my application. I want to be able to swipe between two container views using segmented control. I want to add two overlapping container views (container views…
2
votes
1 answer

Using trailingSwipeActionsConfigurationForRowAt with a panGestureRecognizer with Swift

I have a view which I've added a UIPanGestureRecognizer to. I've noticed that the trailingSwipeActionsConfigurationForRowAt does not work together with this pan. When I remove the pan the trailing swipe works fine. Is there anyway to use both…
2
votes
2 answers

UISwipeGestureRecognizer on tvOS is giving me a EXC_BAD_ACCESS

I'm trying to add gesture code for swipe up/down to my UIViewController in a tvOS app. override func loadView() { let swipeDown = UISwipeGestureRecognizer( target: self, action:…
Justin808
  • 20,859
  • 46
  • 160
  • 265
2
votes
0 answers

How to make a SwipeRefreshLayout doesn't trigger when I am using a Google map?

I am working in Android Studio, I have a SwipeRefreshLayout and inside this a WebvIew that loads a Google map, when I try to move around the map and I slide from above the WebView is updated making it impossible to use the map correctly, is there…
2
votes
3 answers

How to add swipe gesture for uilabel inside tableview in ios swift?

I am trying to creating check list in a table view. Inside table view radio button and UILabel, here adding swipe gesture to UILabel. For single swipe of UILabel will show radio button or double swipe of UILabel will show dash line. I have tried of…
PvDev
  • 791
  • 21
  • 67
2
votes
1 answer

how can I swipe more than two views in the same direction? Is it possible to pass the same amount of data while swiping to other views?

I have written the following code which i have referred from different blogs and sites and there are no errors..still i am not getting appropriate output. Also tried adding some other codes in the code below. Not sure what's wrong with it. import…
Saurabh
  • 745
  • 1
  • 9
  • 33
2
votes
0 answers

How would you move a UIView on screen using siri remote touchpad on tvOS

tvOS is so strongly built around the Focus Engine that it is unclear what one can do to move an item, let's say a simple UIView on the screen, rather than move the focus from one static object to another. So far I've managed to create a Pan Gesture…
2
votes
1 answer

How to detect gesture between swipe and drag?

I want to create one view in main view and apply both swipe and drag (pan) gesture to that view. But how to know that that is swipe or pan gesture?
2
votes
2 answers

UISwipeGestureRecognizer state always Ended

I'm trying to make a custom interactive transition triggered by a UISwipeGestureRecognizer but the state is always UIGestureRecognizerStateEnded, so I can't use it to control the animation. Apple's documentation says Some of these states are not…
Cbas
  • 6,003
  • 11
  • 56
  • 87
2
votes
1 answer

UIScreenEdgePanGestureRecognizer is triggering multiple times

I'm using the following code for going back and forward in my WebView with UIScreenEdgePanGestureRecognizer: class FirstViewController: UIViewController { @IBOutlet var homewebview: UIWebView! // create left edge and right edge…
user6423177
2
votes
0 answers

How to call the UICollectionView built in swipe gesture from a Pan Gesture on the view? (preferable in swift)

I apologize in advance if this question has been answered somewhere else, I've tried finding it, but no luck. I have a UICollectionView taking up half my view with each cell taking up the full width of the view. It scrolls perfectly and changes…
2
votes
1 answer

Assign unique behaviour for two-finger swipe on scrollview

I would like to assign a unique behaviour for two-finger swipe on WKWebView. Referring to this site, I wrote codes as below. It worked, but scrolling on webview got extremely slow. Is there any better way to do it by avoiding slow scrolling? let…
2
votes
1 answer

UIView move up & down

currently I am moving uiviews from left to right on the swipe gesture of down how can I change transition to up and down -(void)slideToRightWithGestureRecognizer:(UISwipeGestureRecognizer *)gestureRecognizer { [UIView animateWithDuration:0.5…
user5276912
  • 131
  • 1
  • 1
  • 8
2
votes
2 answers

UISwipeGestureRecognizer implementation with Swift

I have a tabbed application with three tabs and I want to make the transition between them with a Swipe Gesture Recogniser. I dragged and dropped one Swipe Gesture Recogniser from the Object Library to the first View and one to the third View. I…
2
votes
1 answer

SKSpriteNode erratic swipe?

I have created the following sprite kit node : SKSpriteNode *megadeth; megadeth = [SKSpriteNode spriteNodeWithImageNamed:@"megadeth_rocks.png"]; megadeth.name = @"awesome"; and added the swipe gesture as follows: -(void)didMoveToView:(SKView…