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

ios drawing on uiscrollview with pan and pinch

This is a self-answering question in gratitude to the various help I've gained off both StackOverflow and the Ray Wenderlich tutorial on drawing. I thought I'd put the various snippets together in one package. My problem was that I wanted to do…
0
votes
1 answer

iOS - UIPinchGestureRecognizer & UIPanGestureRecognizer - Reset

In my application for zooming and panning, i'm using above said gesture recognizers. This is working fine. I want to a button which will bring back the image to initial state. That means show the actual image or reset to initial state. Can some one…
Satyam
  • 15,493
  • 31
  • 131
  • 244
0
votes
2 answers

How to apply UIPinchGesture on UIView?

I have one UIView which hold one UIImage . I want to apply UIPinchGesture on this UIVIew Programatically. I want to resize this UIView. I am adding UIPinchGestureRecognizer *pinchRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self…
JDev
  • 15
  • 10
0
votes
2 answers

Zoom UIImageView from center of two fingers and also with button click

I have a image view and want to add some custom pinch gesture recognizers. I'm able to zoom my image view, but the problem is, it is not zooming in from the center of the two fingers. How can I zoom from center of the two fingers? This is what I'm…
AJ Tech
  • 5
  • 6
0
votes
2 answers

How to Zoom in and Zoom out ImageViews of in a scrollView

I have a scrollview in which i m showing all the imageViews from an imageArray and i have done paging enabled. Now i want to zoom in and zoom out the images in the scrollview. Can someone tel me whats the best way on doing it ??
0
votes
1 answer

UImageView get blurred after i set its old frame because i cancel a pinch gesture

I m writing an APP so the user can draw over an UIImageView He can also pinch on it for zooming in/out. I have implemented an UNDO feature. So every time the user draw a stroke or pinch the picture, i save the UIImage and the frame : …
0
votes
1 answer

iOS UIPinchGestureRecognizer getting offset with unknown source at the UIGestureRecognizerStateEnded state

I have a UIView with custom drawRect() method, used for some drawing. I use UIPinchGestureRecognizer to achieve zooming effect. This is action method: - (IBAction)handlePinch:(UIPinchGestureRecognizer *)recognizer { //NSLog(@"Pinch gesture…
Martin Berger
  • 1,639
  • 3
  • 18
  • 39
0
votes
2 answers

UIPinchGestureRecognizer selector not getting called on UIImageView

I've been trying to figure this out for hours, completely at a loss here. I'm trying to implement a UIPinchGestureRecognizer for some of the custom UIImageViews in my game, but it doesn't work. Everything thing I've researched says it should work,…
0
votes
2 answers

Only increase height or width using pinch gesture

Possible Duplicate: Using UIPinchGestureRecognizer to scale uiviews in single direction My code is below: UIPinchGestureRecognizer *croperViewGessture = [[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(croperViewScale:)]; …
0
votes
1 answer

UIPinchGestureRecognizer zooming all views

In my project I have a UIImageVIew where the user imports a backgroudn and then puts smaller pictures on that background. I want to apply the gestures only to the smaller pictures that are being tapped. The gestures I am using are tap, long press,…
0
votes
1 answer

Changing a circle's size with UIPinchGestureRecognizer

I'm drawing a simple circle in the center of the screen: int radius = 100; - (void)addCircle { self.circle = [CAShapeLayer layer]; self.circle.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, 2.0*radius, 2.0*radius) …
Jonathan
  • 13,947
  • 17
  • 94
  • 123
0
votes
1 answer

Creating a group of new objects equidistantly around a point but rotated based on a uipinchgesture touch location

Using a pinch gesture I split a sprite/box2d body into n number of shapes. I determine where the shapes are created using the method equidistantPointsOnACircleForMidpoint. I want to move these objects based on an (approximate) rotation/movement…
0
votes
0 answers

Pinch Gesture Recognizer Delay on Device

I have put a pinch gesture recognizer in my app. It works fine on the simulator. But there is a very long delay on the device before the gesture goes through and updates. Any ideas what might be causing this? This is on the new iPhone also so it…
Cherr Skees
  • 1,508
  • 2
  • 21
  • 37
0
votes
2 answers

Why does UIPinchGestureRecognizer couldn't recive Ended state?

I have 4 gesture recognizers for 1 view. - (void)createGestureRecognizers { UITapGestureRecognizer *singleFingerSingleTap = [[UITapGestureRecognizer alloc] initWithTarget:self…
0
votes
2 answers

Can I pass a pinch gesture recognizer to a ScrollView to have it zoom?

I wrote a custom pinch gesture recognizer for my ScrollView's zooming, and I handle pinch touches in a method in my view controller. But in some cases, I want the ScrollView to behave exactly as it would normally behave (if it used the standard…
1 2 3
16
17