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
0
votes
2 answers

Getting name of cell from indexPath / Swip Gesture

The Situation I'd like to be able to get information about the title of a cell within a UITableView when the user swipes the cell (to display the "delete" button). The Code When the user swipes a cell in the UITableView, this method is fired: -…
Sam Spencer
  • 8,492
  • 12
  • 76
  • 133
0
votes
1 answer

using NSMutableArray to change subviews

I have creates an array of three viewControllers which I would like to swipe between. and have animate across the screen. So far I have created the array of views, have gesture control and am loading the first view of the array to the view in the…
HurkNburkS
  • 5,492
  • 19
  • 100
  • 183
0
votes
0 answers

How to find UISwipeGestureRecognizer & UIPanGestureRecognizer for the same view in different direction?

I setup both UISwipeGestureRecognizer & UIPanGestureRecognizer to a same view. That view has a table view. I want to execute UISwipeGestureRecognizer when the user swipe a table cell towards left direction & want to execute UIPanGestureRecognizer…
0
votes
2 answers

How to access the 'direction' property of a UISwipeGestureRecognizer?

Possible Duplicate: Get swipe direction in Cocoa In my program I have created a UISwipeGestureRecognizer in a header file and configured its directions to be UISwipeGestureRecognizerDirectionLeft and UISwipeGestureRecognizerDirectionRight in the…
0
votes
1 answer

How can I disable left and right swipe gestures on a UITableView

I have a UIPageViewController that has a large table in each content view. When I start swiping left or right outside of the UITableView the page turn effect is triggered. When I swipe left or right within the bounds of the UITableView the…
0
votes
2 answers

UISwipGestureRecognizer crash

I'm asking for your help for i think a simple problem but i didn't manage to understand what's happening with my view. I'm displaying an OpengGL view launched by my UIViewController like this: //OpenGL view init CGRect…
Bobyblanco
  • 123
  • 12
0
votes
1 answer

Swipegesture on MPMoviePlayerController disturbs seeking the video in iOS 4.x

I am working on an iOS app in which I am showing the videos in MPMoviePlayerController.The user can change the video by swiping the mpmovieplayercontroller.I have managed it by using UISwipeGestureRecognizer. All works well in iOS 5.0 but when I…
-1
votes
3 answers

How to use UISwipeGestureRecognizer on UIButton?

I have a UIbutton which i want to work as a joystick. So i am trying to add some gesture recognizer on the same button. I have this in my code right now: @implementation CUETutorialSixteenClusterRootController - (id)initWithNibName:(NSString…
Ashutosh
  • 5,614
  • 13
  • 52
  • 84
-1
votes
1 answer

Updating CoreData through UISwipeGestureRecognizer on custom UITableViewCell?

I am adding a custom swipe gesture on a UITableViewCell that updates CoreData when a specific cell is swiped. However, I am having trouble passing the indexPath of the swiped cell to the function that will modify the CoreData. I am not using a Table…
gmdev
  • 2,725
  • 2
  • 13
  • 28
-1
votes
2 answers

I want to add image and text side by side in a trailingSwipeActionsConfigurationForRowAt and leading swipe action when swipe in a tableview swift

I know when we set the height of cell to 91 it shows both image and text vertically but I want horizontally side by side without setting height.
-1
votes
2 answers

How to move view back to its position?

I have the following code to swipe a view out of the screen when swiped right let gesture = UISwipeGestureRecognizer(target: self, action: #selector(swipedView(_:))) gesture.direction = .right centerView.addGestureRecognizer(gesture) @objc func…
iOSDev
  • 326
  • 2
  • 10
-1
votes
1 answer

Make a sprite move in all directions

@objc func handleSwipe(gesture: UIGestureRecognizer) { if let gesture = gesture as? UISwipeGestureRecognizer { switch gesture.direction { case .up: ballPlayer.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 0)) …
-1
votes
3 answers

Swipe to Like on UITableViewCell not working as expected - Swift

I'm using a UISwipeGestureRecognizer to detect a swipe for a cell in a UITableViewCell, similar to THIS LINK which will allow the user to 'Like' a photo. The problem is that I dont quite understand how to change the Like value for that specific post…
Brewski
  • 654
  • 3
  • 14
  • 29
-1
votes
1 answer

create custom tabbar using containerview on swipe animation

I am creating custom scrollable tabbar using container view i used swipe gesture fo scrolling on swipe i want to do animation on swipe i used UIview.Animate but i can't get animation effect let me show you my code @objc func…
Vishal
  • 23
  • 6
-1
votes
1 answer

Two Swipe Gesture Recognizer on ViewController, only one works?

I have two Swipe Gesture Recognizers on my ViewController. One works fine, when I swipe right it goes back to the previous View. However, the recent one I added doesn't work at all. I have set it to go to a different View Controller when I swipe…
George
  • 322
  • 1
  • 6
  • 25
1 2 3
35
36