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

Pinch gesture for zoom and pan/tilt

How do i use the UIPinchGestureRecognizer for multiple purposes? At the moment i am using it to zoom in/out of my GLKView, but i would like to use the gesture to move around (pan/tilt), but at the same time being able to zoom. I have seen this…
JavaCake
  • 4,075
  • 14
  • 62
  • 125
1
vote
1 answer

How to stretch images on touch direction in iPhone sdk?

I am working on customizing images. My requirement is to stretch or shrink image in touch direction & cropping image. I have done cropping but how I can stretch & shrink image in touch direction. Is it possible?
1
vote
2 answers

Where to add UIPinchgesture on UIImageView which scale or on UIView in which UIImageView contain?

Experts!! Please help me in this!!!!! In my project I am programatically creating multiple UIImageviews. I want to add Pinch gesture on each ImageView.i My code is below.... -(IBAction)addSymbols:(UIButton *)sender{ if (sender.tag ==1) { CGRect…
Nevpro
  • 33
  • 1
  • 7
1
vote
2 answers

I need help subclassing UIPinchGestureRecognizer to find the location of the touches during the pinch

I need to track where the touches are while the user pinches to do some fancy bits and pieces, for a game, unrelated to zooming. I can detect pinches but I can't find the location of the taps during the pinch, only the midpoint (even using the…
1
vote
1 answer

Pinch to Zoom iPhone

Is there anyway I can get pinch to zoom working for my game when it is running on the iPhone? I made the game for a class project using Stencylworks. The game runs perfect on the iPad and also works on the iPhone except the scenes are zoomed in…
0
votes
1 answer

How can I stop Full screen video after I resize it?

I try to resize video with Pinch Gesture. But after I pinch and animate resizing , video get to full screen that I dont want. How can I stop full screen ?? take a look at my code and Please to help me { NSString *moviePath = [[NSBundle…
crazyoxygen
  • 706
  • 1
  • 11
  • 30
0
votes
2 answers

UIScrollView and UIPinchGestureRecognizer

I have a UIView with where I load images into subviews with scrolling and paging enabled, it's working ok. Now I'm adding a pinch gesture to zoom on the images and it's working but with a few problems: I seem to be zooming the whole scrollview, not…
KeLLoGsX
  • 1
  • 1
  • 1
0
votes
1 answer

UIScrollView with UIPinchGesture

I have a UIScrollView with a UIPinchGesture attached to it. My problem is though if I do a pinch gesture it moves the UIScrollView's and can see this when NSLogging the UIScrollView's X/Y. I was wondering if anyone has any ideas to prevent this…
0
votes
0 answers

Is there a library or has anyone implemented apple photos pinch to change grid column numbers in iOS

In the photos app when you pinch on the grid, the number of column changes accordingly and also the cells update when pinch is in progress. It also allows to zoom into grid at any part of the grid. Does anyone know how to achieve this kind of…
0
votes
0 answers

How to zoom only the pinched region in a 3d model and not the model as a whole in scenekit using swift

This is my code for handling pinch. This only zoom the whole model in its pivot even if we pinch in a specific region. I want to pinch zoom only in the selected area of model.How to achieve this? Even after applying node hittest, it did'nt worked as…
0
votes
0 answers

View disappears after changing the height with pinch gesture, layer issue

This is my code. I include every thing to be able to run it. I have two views in a container view. One of them contains buttons. That works fine. The other I draw a grid on it. When I pinch and scale the size of the grid view to more than 5000 or…
0
votes
0 answers

UIKit pinch gesture in a mixed SwiftUI / UIKit environment presents issues with scaleEffect, anchor and offset

Apple provides some elegant code for managing pinch gestures in a UIKit environment, this can be downloaded directly from Apple. In this sample code you will see three coloured rectangles that can each be panned, pinched and rotated. I will focus…
0
votes
0 answers

pinch zoom image view inside the view only

I am trying to zoom image view inside a UIView, but it zoom outside the UIView. Condition : without using scrollview here is my code : extension UIImageView { func enableZoom() { let pinchGesture = UIPinchGestureRecognizer(target: self,…
DSRawat
  • 87
  • 1
  • 9
0
votes
0 answers

Pinch and zoom UIView without transform

I have an UIView placed over an UIImageView and I am trying to pinch-zoom the UIView over the image view without applying transform. The code is as below where something goes wrong which makes the UIview zoom-in/out drastically and moves out of the…
XiOS
  • 1,665
  • 2
  • 18
  • 22
0
votes
0 answers

iOS MKMapView how to stop scrolling/moving while user pinching to zoom in

I have added a UIPinchGestureRecognizer to handle zoom in / out. But while doing so map also starts moving and scrolling. How to ignore this pan/scroll during pinching and catch only while user purposely scrolls using 1 finger. One strange thing I…