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

Horizontal-only pinch zoom in a UIScrollView

I'm using a UIPinchGestureRecognizer to adjust the width (not the height) of a view in a UIScrollView. It works with the pinch gesture's scale property, but the contentOffset of the scrollview doesn't change, so the view always increases on the…
Jason Moore
  • 7,169
  • 1
  • 44
  • 45
1
vote
1 answer

Limit Pan Gesture with Pinch Gesture

I'm creating a game in Spritekit and am using the Pan Gesture with the Pinch Gesture in order to view a map. Currently I am limiting the zoom of the Pinch Gesture to 2.0 scale. I'm trying to limit the Pan Gesture to the bounds of the screen even…
1
vote
1 answer

UIImageView scaling?

I have two questions relating to UIImageViews and the pinch gesture: I looked at the documentation for layer.anchorPoint and it says that this is the point at which all transformations are based, and it is located at the center of a view…
user3672051
1
vote
1 answer

Pinch Gesture Zoom only Zooms UIImage from Upper Left Corner

I am fairly new to this and I'm trying to use pinch gestures to zoom in on a UIImage and be able to zoom into any specific part of the image. However, when I zoom it only zooms from the upper left corner of the UIView. So I only get to see the…
Jupiter869
  • 657
  • 2
  • 7
  • 19
1
vote
0 answers

How to manually handle UIPinchGesture?

In my project, I have an UILabel within a view. I have to adjust the font size with respect to scale value of recognizer. If I use transform directly frame of the view won't get updated, eventually my text will not be visible fully. Currently, I am…
karthik
  • 125
  • 1
  • 1
  • 5
1
vote
0 answers

Keep UICollectionViewCell centered after Zooming with UIPinchGestureRecognizer

I'm having this issue. I change the scale and as well the transition of the view of a UICollectionViewCell, for doing zoom in the position of my fingers do the UIPinchGesture. But after that, the position of the view changes and the view go off the…
1
vote
0 answers

UIPinchGestureRecognizer scaling a UICollectionView

I'm trying to use a pinch gesture to scale a collection view only in the y direction. I'm setting the scale correctly (sufficiently), but having trouble keeping the pinched area of the collection view centered. I've seen many examples of adjusting…
Larvell Jones
  • 159
  • 2
  • 15
1
vote
1 answer

How to zoom cropping overlay with image in iOS

I have an unusual requirement as drawn in the image below Explanation: (A) - Its an UIImageView control with pinch gesture added on it, that allows it to zoom (B) - Normally user starts zooming from the area (C) - The Cropping overlay, that allows…
iphonic
  • 12,615
  • 7
  • 60
  • 107
1
vote
1 answer

Multiple UIViews pixelated when zooming

I have two UIViews (BlueView and RedView) that draw a UIBeizerPath (It must be uibeizarpath). My MainView initializes both views and controls the zoom feature. I can get the views to zoom, however, when they zoom the UIBeizerPaths are pixelated. I…
1
vote
2 answers

UILable numberoflines and font size automatically set during zoom in out time

My requires is as below. i have a added UILable inside UIView width & height is 30. i have set UIPinchGestureRecognizer to that UIView. Pinch in out functionality is working fine with UIView. But my i want that when i zoom in UILable font size…
Hitarth
  • 1,950
  • 3
  • 27
  • 52
1
vote
0 answers

Trying to open ViewController B by pinching view on ViewController A

I'd like to be able to navigate to another viewController by pinching view on the current viewController. The console shows that the view is recognising the pinch gesture and it logs it. However I'm not clear on how I can trigger the pinch to open…
Emré
  • 63
  • 5
1
vote
1 answer

How do I use a pinch gesture to open another viewController?

I want to be able to open viewController B by pinching the screen on viewController A. Ideally I would like to be able to do this in Storyboard. Any help/direction would be much appreciated. Thanks
1
vote
3 answers

Controlling UIGestureRecognizers from the corner of a UIImageView

In my app I allow for a user to pick an image and then select other images to layer over the top of the main image. I then implement gesture Recognizers to pinch, pan and rotate the top images. For example, a user could select an image of a person…
helloJello
  • 196
  • 2
  • 9
1
vote
3 answers

Add UIPinchGestureRecognizer on main view and detect touch on subviews

I added some subviews (UITextView) on main UIView ([self view]) to scale/pinch and dragging them around the screen. Everything works fine for ONE subview with a tag (mytextview1.tag = 1). But how to tell the UIPinchGestureRecognizer that there is…
1
vote
1 answer

Weird behavior UIView animation on gesture recognizer's sender.view in paging UIScrollView

Setup: I have a horizontal paging UIScrollView set up with help of the LXPagingViews class (to easily add a 'peeping' UIScrollView). This is set up, so you can flick between different views in the UIScrollView. I have added a…