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

Cannot get UIPinchGestureRecognizer to work

I can't seem to get this to work programatically. I have a UIImageView which I want to make Draggable and Pinchable. Everything for the draggable part is working, the pinch on the other hand doesn't seem to work. My Custom UIImageView Class…
Lavvo
  • 1,024
  • 3
  • 16
  • 35
0
votes
1 answer

Trouble pinch zooming core plot graph in iOS

I have created a graph with Core Plot and am trying to use the pinch zoom feature. I want the pinch to work in just the x axis or just the y axis. I have accomplished this by using the following code in a pinch gesture recognizer that I put in. -…
Douglas
  • 2,524
  • 3
  • 29
  • 44
0
votes
1 answer

How to give a specific gesture recognizer

When I apply panDetected like this, the image is moving everywhere on the screen. I just want this feature to at the top in specific rectangle. What should I change? -(void) panDetected: (UIPanGestureRecognizer * ) panRecognizer { CGPoint…
0
votes
1 answer

PinchGesture and maximum, minimum limit

I tried to set the maximum and minimum limit of PinchGesture. But still have the problem of getting very small to almost disappeared or becomes very big and disappeared. What could be wrong with my code? I want to be two times bigger than the…
batuman
  • 7,066
  • 26
  • 107
  • 229
0
votes
1 answer

Image + Pinch gesture recognizer

I have created an imageview inside of a view by programatically not using storyboard. and i added pinch gesture recognizer for that view.. but it should pinch the image in every way with specific scale ? Is there any way to do…
dicle
  • 1,122
  • 1
  • 12
  • 40
0
votes
0 answers

Swift: Limiting Pinch to not go smaller then original and limit Zoom to no more then 3X

I would like to place some limits on Pinching an image. The user should not be able to go smaller then the original image, and no more then 3X the original image. Tried a few things, but have not found a solution. Any help appreciated. // Pinch…
Edward Potter
  • 3,760
  • 4
  • 28
  • 39
0
votes
1 answer

iOS Pinch Zoom on Map with Image Overlay?

Want to know if it is possible to Pinch Zoom on a map that has an image overlay on top of it? So for example, in the app is a map. I want to add an image on top of the map yet still retain the functionality of zooming in/out of the map using the…
dennis
  • 143
  • 1
  • 12
0
votes
0 answers

Mask UIView and pan / pinch an uiimagview

i have this task as you can see in image: please note that in the circular dashed view i need to add pan gesture to move uiimage and pinch to zoom in / out. How would you accomplish this? thanks million
0
votes
1 answer

Restrict movement of shape to dimensions of UIImageView

Using some code I came across that draws a circle shape over an image. Pan and pinch gestures are used on the circle shape being drawn. The movement of the shape crosses over the dimensions of the UIImageView, onto the rest of the UI that is not…
0
votes
1 answer

Pinch Gesture Segue in/out of ViewController

I currently have an ICarousel view with about 5 subviews. I'm looking for a way to give the user the ability to pinch (out) on one of the view and a new UIViewController slowly grow/expand from the middle of that view. It would start off tiny and…
huddie96
  • 1,240
  • 2
  • 13
  • 26
0
votes
1 answer

UITapGestureRecognizer and UIPinchGestureRecognizer not working

I want to show a map and add a pin on it which is clickable. The gesture recognizer on the map is working but on the pin not. I tried UIGestureRecognizer and UIPinchRecognizer with giving itself as a parameter and without. No success. let…
0
votes
3 answers

UIPinchGestureRecognizer is firing twice

I am adding UIPinchGestureRecognizer to a scrollView which shows images. On pinch, I am presenting a new view. var pinch = UIPinchGestureRecognizer(target: self, action: "showFullScreen:") self.scrollView.addGestureRecognizer(pinch) The…
saurabh
  • 6,687
  • 7
  • 42
  • 63
0
votes
2 answers

@selector in UIPinchGesture is not called

I had detected the two finger touch for imageview and given condition that if two finger is touched then pinchGesture have to perform the selector for imageview. if ([[event allTouches]count] == 2) { imageView.multipleTouchEnabled=YES; …
0
votes
1 answer

Convert PinchRecognizer Objective-C code to Swift

I am trying to translate the Objective-C code to Swift, can someone help. I am stuck on one line. Objective-C -(void)pinchDetected:(UIPinchGestureRecognizer *)pinchRecognizer { if([pinchRecognizer state] == UIGestureRecognizerStateBegan) { …
0
votes
2 answers

Swift - UIPinchGestureRecognizer in UIPageViewController

Okay, I've created a pageview slider app. Everything works great, but now I'd like to be able to Pinch In/Out of my UIPageViewController using UIPinchGestureRecognizer. I have everything set up in code, but I still get this ERROR when I…