Questions tagged [uipinchgesturerecognizer]

UIPinchGestureRecognizer is a concrete subclass of UIGestureRecognizer that looks for pinching gestures involving two touches.

When the user moves the two fingers toward each other, the conventional meaning is zoom-out; when the user moves the two fingers away from each other, the conventional meaning is zoom-in.

Pinching is a continuous gesture. The gesture begins (UIGestureRecognizerStateBegan) when the two touches have moved enough to be considered a pinch gesture. The gesture changes (UIGestureRecognizerStateChanged) when a finger moves (with both fingers remaining pressed). The gesture ends (UIGestureRecognizerStateEnded) when both fingers lift from the view.

Whole document - UIPinchGestureRecognizer

248 questions
6
votes
0 answers

AVFoundation Camera Captured Zoom Photo issue

Below i have pasted code for zoom module.the zoom also works little slugish and the result image for captured photo is not according to zoom i.e the result image is slightly zoom-in.Can someone guide me.Thanks func…
Mukesh
  • 3,680
  • 1
  • 15
  • 32
6
votes
0 answers

Zooming UICollectionView with custom layout, but centering on pinch

I'm working on making a large grid using a UICollectionView, and I want it to be zoomable (the entire UICollectionView, not just a single cell) with the standard pinch-to-zoom gesture. The grid in question has a custom UICollectionViewLayout,…
6
votes
4 answers

Unpinch custom gesture recognizer with three fingers in iOS

I want to make a custom gesture recognizer with three fingers. Which is similar to unpinch gesture recognizer. All I need is an idea about how to recognize it. My gesture needs to recognize three fingers with three directions. For example: I…
Dinesh Raja
  • 8,501
  • 5
  • 42
  • 81
6
votes
1 answer

Get UIPinchGestureRecognizer finger positions

Im using the UIGestureRecognizer to transform a view and its workin perfectly, but now I want to use it to transform my view width and height independently. The only way that comes to my mind to solve this is getting the two finger positions and…
6
votes
1 answer

Three finger pinch gesture

I'm having some issues trying to implement a 3 finger pinch. I've been using a 2 finger pinch with a 2 finger rotation, individually ! (no simultaneous gesture needed or wanted) the problem is that many times, the system identify the wrong movement…
Plauto Abreu
  • 449
  • 1
  • 4
  • 9
5
votes
3 answers

Resize font and frame with pinchGesture when textView isScrollEnabled = false

I have used pinchGesture to zoom-in and zoom-out textView using below code. added pinchGesture to textView let pinchGesture = UIPinchGestureRecognizer(target: self, action: #selector(self.handlePinch)) pinchGesture.delegate =…
PinkeshGjr
  • 8,460
  • 5
  • 41
  • 56
5
votes
1 answer

Resizing Sprite Kit Node using Pinch Gesture

I'm trying to implement pinch gesture recognizer to resize my sprite node. I'm using setScale(sender.scale) to do that, but every time I lift my fingers and try to pinch again, my sprite reset to 1.0 scale before scaling to the pinch again. What I…
5
votes
1 answer

Pinch, drag and pan at the same time

I have a label on the UIImageView as below. The label is draggable, pan-able and pinch-able. However I can only do one gesture at a time. For example, I want to drag the label while I'm pinching it like in texts on images in Snapchat and Whatsapp.…
Emre Önder
  • 2,408
  • 2
  • 23
  • 73
5
votes
2 answers

SceneKit camera node resets on pinch gesture

I am trying to achieve a zoom on a pinch gesture however every time I pinch a second time, the model resets itself. func zoom(scale: Double){ self.cameraNode.camera!.xFov = scale self.cameraNode.camera!.yFov = scale } func…
user4432964
5
votes
0 answers

Swift: how to implement a resizable personalized uiview with four buttons at vertexes

I would like to implement a resizable and draggable UIView like the following picture shows: This is the class I have implemented up to now using simple gestures recognizers: class PincherView: UIView { var pinchRec:UIPinchGestureRecognizer! var…
SagittariusA
  • 5,289
  • 15
  • 73
  • 127
5
votes
3 answers

How to reduce velocity of pinch-zoom UIGestureRecognizer

I've created a UIGestureRecognizer much like this one: - (void)handlePinchGesture:(UIPinchGestureRecognizer *)gestureRecognizer { if([gestureRecognizer state] == UIGestureRecognizerStateBegan) { // Reset the last scale, necessary if…
brandonscript
  • 68,675
  • 32
  • 163
  • 220
5
votes
3 answers

how to set anchor point of view for pinch zoom (GMGridView)

I am doing research on "Solar" app for learning purpose. I noticed a tile can be zoomed using pinch gesture. The way it was zooming clearly showed that had set anchor point of uiview. you may see its video here …
5
votes
4 answers

How to set minimum and maximum zoom scale using UIPinchGestureRecognizer

I want to zoom in and zoom out an image view and i dont want to use UIScrollView for that. so for this i used UIPinchGestureRecognizer and here is my code - [recognizer view].transform = CGAffineTransformScale([[recognizer view] transform],…
TheTiger
  • 13,264
  • 3
  • 57
  • 82
4
votes
3 answers

Resize font along with frame of label using pinch gesture on UILabel?

Increase or decrease font size smoothly whenever user resize label using pinch gesture on it. Note Without compromising quality of font Not only transforming the scale of UILabel With support of multiline text Rotation gesture should work proper…
Bhavik Modi
  • 1,517
  • 14
  • 29
4
votes
0 answers

Instagram like Pinch to Zoom + Translation

Trying to use a pinch gesture to move an image much like Instagram. Normal if this was a pan, I'd use translation using CGPoints and center it to a view. I've currently been able to zoom like so: @IBAction func handleShirtsZoom(_ sender:…
1
2
3
16 17