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

Handling Pinch Zoom Gestures

I am working with the apple sample code _TapToZoom. They handled single, double taps using UIGestureRecognizers to scale the scrollview(with image) when user taps. Now I would like to implement the same functionality when user pinch zooming on the…
svchen
  • 1
0
votes
1 answer

Pinch, Pan and Double tap gesture on UIImageView

I want to apply these gestures on an imageview with following restrictions: 1)Double Tap: Zoom image two times and then return to original size 2)Pinch: Zoom image with a maximum limit and minimum limit to original size 3)Pan: When image is zoomed…
0
votes
1 answer

How to add a scaled, panned and rotated image from one view controller to another in exact same way as its scaled, panned and rotated, in Swift?

I have 2 view controllers,in which both have UIView added and UIImageView added programatically.In ViewControllerA-The image is scaled, panned and rotated. I want to show the same image with same scaled, panned and rotated value in ViewControllerB.I…
0
votes
0 answers

Pinchgesture scale the its subview also?

I have tried many of solution in online that does not help so i decided to ask help from you all. I have UIImageView with added Pinchgesture to it. I have requirement to add Pin(UIButton) on UIImageView. Without zooming a imageview i am adding a…
karthikeyan
  • 3,821
  • 3
  • 22
  • 45
0
votes
1 answer

How to Zoom in on a scroll view in swift 4?

My view controller programmatically creates several image views in a grid inside a scroll view. I want to be able to pinch to zoom in/out. I have pasted some similar code below which I found on stack overflow trying to do the same thing. The issue…
0
votes
0 answers

Zooming image in gesture recogniser ios goes out of bounds

I am trying to zoom image within frame of image i added a view in which i add 2 images one is frame and one is image that pinch zoomed code is working successfully but image goes out of view when zoomed. here is my code @objc func…
Innocent
  • 703
  • 10
  • 21
0
votes
1 answer

UITextField flickers and gets wavy when size is scaled down

I've got a UITextField with "llllllllll" as text in it. I use a pinch gesture to scale it down by decreasing view's transform.a from 1 down to 0.001 or lower. When the text field gets smaller I observe wave and hairline flicker effects. What…
0
votes
1 answer

Creating zoom on UIImageView in swift

I am currently loading images from my server. The images are plenty depending on the number of images it return. I have been able to display these images successfully and I can scroll down to view all images. Now my problem is I want a way which I…
chevi99
  • 123
  • 1
  • 2
  • 17
0
votes
1 answer

Unable to deallocate Gesture Recognizer from Memory Stack

I'm trying to implement a Custom Gesture Recognizer on my mapView that will prevent users from zooming in or out past a certain threshold set by a MKCoordinateSpan. The mapView's ViewController is part of a tab bar Controller, so I'm removing the…
Wilson Desimini
  • 722
  • 5
  • 10
0
votes
1 answer

Disable zoom out on UIPinchGestureRecognizer

I want to disable zooming out, I have tried doing it through storyboard on UIScrollView by setting the min value but it made no difference. let tap = UIPinchGestureRecognizer(target: self, action:…
iOSHG
  • 69
  • 1
  • 9
0
votes
1 answer

Make UIPinchGestureRecognizer work outside imageview like stickers in Instagram story

I am working on an image editing application. When sticker is added to the view, pinchGesture can be used to scale it. Problem is when the imageView(sticker) is very small, the gesture is very difficult to use. I need to be able to pinch outside of…
0
votes
3 answers

Delay in zoom animation UICollectionView with UIPinchGestureRecognizer

Please, tell me the best way to "zoom in/out" UICollectionView and change size of UICollectionViewCell. I'm using a UIPinchGestureRecognizer now: When UICollectionView is "zoom in" and "zoom out", there are serious delays and freezing. How can I…
0
votes
0 answers

pinchToZoom action doesn't work in UICollectionViewCell

Im trying to create a UICollectionViewCell which uses the AVFoundation Library to zoom in on the screen while the camera is open. The code works fine in a standard UIViewController however when I try to run it inside of my UICollectionViewCell I get…
0
votes
1 answer

Return image to original size after pinch UIPinchGestureRecognizer

I'm doing a page view controller with a photo album, and since I haven't been able to find a way to pan the image zoomed without changing the picture, I want the image to return to its original size when the user stops pinching. This is my code: …
user9128806
0
votes
3 answers

Specfic part of UIView zoom in/out without increasing hight/width of View objective C iOS

I implement this .but problem is that it increase hight/width of the view with zooming.How to zoom without increasing the hight/width. My UIView hight/width is fixed.My basic aim is that view hight/width remain same but zoom inner side of the view. …
Shahbaz Akram
  • 1,598
  • 3
  • 28
  • 45