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

Prevent CGAffineTransfromScale from scaling outside of self.view

I am using this method to scale an imageView. -(IBAction)handlePinching:(UIPinchGestureRecognizer *)recognizer { recognizer.view.transform = CGAffineTransformScale(recognizer.view.transform, recognizer.scale,recognizer.scale); recognizer.scale…
1
vote
0 answers

AVCaptureSession zoom in feature while clicking images

I have implemented a camera using AVCaptureSession I want to implement pinch gesture to allow user to zoom and take images. I have gone through various links but of no help,How can I go about it?
1
vote
1 answer

Swift - pinch zoom multiple images

I have a scrollview which holds an imageview, which by itself pinches and zooms just fine. My issue is when I'm programmatically adding additional imageviews to the scrollview, they are then doing the zooming and not the main scrollview. In fact,…
1
vote
2 answers

UIPinchGestureRecognizer (Zoom out /Zoom in)

i have used UIPinchGestureRecognizer in my application for zoom in or zoom out the image.its working on zoom in /zoom out . but i want to set the minimum and maximum scale of UIPinchGestureRecognizer So that the image is not zoom out smaller Than …
user410848
  • 11
  • 1
  • 2
1
vote
0 answers

How to implement pinch gestures in iCarousel for zooming in and zooming out

I have implemented a gallery application by using iCarousel.Now I need to include pinch gestures to zoom in or zoom out each image.I added scroll view and tried the delegate methods.But no success. please help me with this. - (UIView…
1
vote
0 answers

IOS Pinch Zoom In/Out

I am trying to implement pinch zoom in/out on camera view. I have this code so far: - (void) setZoom:(float)zoomValue{ NSError *error = nil; NSLog(@"Current zoom level %f " , zoomValue); if([_device lockForConfiguration:&error]){ if(zoomValue…
Borce Ivanovski
  • 561
  • 1
  • 4
  • 23
1
vote
0 answers

I can not figure out how to properly implement UILongPressGestureRecognizer

I'm trying to implement the UILongPressGestureRecognizer method, but I'm not sure I have the code implemented correctly. I'm trying to change the colors implemented for a toolbar with a long press. AwesomeFloatingToolbar.m - (void)…
1
vote
1 answer

Scale font size UITextView on UIView

I have a UITextView added on my UIView. It is just to display a string. When I add UIPinchGestureRecognizer to my UIView: UIPinchGestureRecognizer * pinchGR = [[UIPinchGestureRecognizer alloc] initWithTarget:self…
1
vote
1 answer

UIPinchGestureRecognizer Disable Pinch Out

I have added a pinch gesture recognizer to a scroll view, using it to close a modal view controller. I did it like so: UIPinchGestureRecognizer *closePinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self…
Gergely Kovacs
  • 1,045
  • 2
  • 10
  • 28
1
vote
1 answer

UIPinchGestureRecognizer and UIRotationGestureRecognizer not working

Hey guys I'm trying to let users rotate and scale the size of UIImageView that I add programmatically but for some reason my gesture recognizers aren't working. To add the UIImageView I use a UITapGesture which I set up through the storyboard which…
1
vote
1 answer

UIPinchGestureRecognizer on superview does not attempt to recognize pinch when touches are located within different subviews

I'm trying to set up a pinch gesture on the root view in my view hierarchy. This pinch gesture is not recognized if the two touches that make up the pinch are located in two different subviews. In the following diagram my green root view is not…
theck01
  • 193
  • 7
1
vote
1 answer

Limit the scaling of pinch gesture method to the height of screen

I have two background images: background.png (1920 x 1280) and background@2x.png (3840 x 2560). Also, app works only on landscape mode. At run time the size of my background image is at its max. PROBLEM: I try to print to the console the height and…
Zapato33
  • 53
  • 8
1
vote
1 answer

Decrease size of UIButtons on Screen upon Pinch Gesture

I have couple of UIButtons on the screen. If a pinch gesture occurs, I want to decrease the size of the buttons (Like a zoom-out effect) and add more buttons. How would I implement it?
Dhruv Ramani
  • 2,633
  • 2
  • 22
  • 29
1
vote
1 answer

Calculate pinch value for bulge distortion filter radius

I need to increase and decrease GPUImagePinchDistortionFilter radius according to pinch, I am using pinch gesture recognizer and storing the starting scale of the gesture recognizer. I need to calculate the pinch scale between -2.0 and 2.0. Here is…
Mahesh Agrawal
  • 3,348
  • 20
  • 34
1
vote
1 answer

Adding UIPinchGestureRecognizer to UIImagePickerController

I'm trying to add UIPinchGestureRecognizer to UIImagePickerController to zoom in/out front camera but were not able to call method inside UIPinchGestureRecognizer (handlePinchWithGestureRecognizer). I didn't get any error but also didn't get any…