uipinchgesturerecognizer

Pinch, drag and pan at the same time

喜夏-厌秋 提交于 2020-01-23 11:18:06
问题 I have a label on the UIImageView as below. The label is draggable, pan-able and pinch-able. However I can only do one gesture at a time. For example, I want to drag the label while I'm pinching it like in texts on images in Snapchat and Whatsapp. My functions are as below. As I searched, I think I should create a custom gesture recognizer but I don't know how. Is there any way I can do it without creating a custom recognizer? I got help from this post while doing this: Snapchat-like text on

Scale of UIPinchGestureRecognizer in horizontal and vertical directions separately

女生的网名这么多〃 提交于 2020-01-22 13:48:06
问题 When using UIPinchGestureRecognizer what is the best way to detect/read the pinch scale in horizontal and vertical directions individually? I saw this post UIPinchGestureRecognizer Scale view in different x and y directions but I noticed there were so many going back and forth for such a seemingly routine task that I am not sure that is the best answer/way. If not using UIPinchGestureRecognizer altogether for this purpose is the answer, what's the best way to detect pinch scale in two

Keep UICollectionViewCell centered after Zooming with UIPinchGestureRecognizer

痞子三分冷 提交于 2020-01-03 02:51:05
问题 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 screen and its bounds. I want that the Gesture View get back to its correct position. This is what is happening: I have tried to assign a CGAffineTransformIdentity to the view if the center of the cell changes, but after the Scale and the

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

爷,独闯天下 提交于 2019-12-24 17:04:52
问题 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 and numberOfLine automatically set in that UIView . So at initial UILable not visible in View. When i Zoom in that time UILable get the are to display text so than UILable will be visible (ex. This time in 3 line). If i increase the Zoom level than

Three finger pinch gesture

依然范特西╮ 提交于 2019-12-23 09:04:16
问题 I'm having some issues trying to implement a 3 finger pinch. I've been using a 2 finger pinch with a 2 finger rotation, individually ! (no simultaneous gesture needed or wanted) the problem is that many times, the system identify the wrong movement because both of them are very similar, so I end up having to remove my fingers and press again in order to try to make the system identify the rotation (usually it identifies the pinch first) I searched a lot to see if the delayBegin would help, or

Pinch zoom shifting image to most left corner on iPad in iOS?

不想你离开。 提交于 2019-12-23 07:26:41
问题 I have a image in iOS. I have added pinch gesture on the image when i pinch the image it shifted to top left corner. I have also added pan gesture on image. When an image is zoomed then i am scrolling the image in every direction for that purpose i have added the pan gesture into the image. My code is : -(void)viewDidLoad { UIPinchGestureRecognizer *pinch=[[UIPinchGestureRecognizer alloc]initWithTarget:self action:@selector(handlePinch:)]; [self.zoom_image addGestureRecognizer:pinch];

Use UIPinchGestureRecognizer to scale view in direction of pinch [closed]

点点圈 提交于 2019-12-21 06:05:44
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I needed a Pinch Recognizer that would scale in x, or y, or both directions depending on the direction of the pinch. I looked through many of the of the other questions here and they only had parts of the answer. Here's my complete solution that uses a custom

UIImageView pinch zoom swift

佐手、 提交于 2019-12-17 06:28:16
问题 I was hoping someone could help me out. I am trying to allow a user to pinch zoom on a UIImageView(with a max and min level allowed). But for some reason the it does not work right. The image zooms a little then just bounces back. Thank you. here is the zoom func func zoom(sender:UIPinchGestureRecognizer) { if sender.state == .Ended || sender.state == .Changed { let currentScale = self.view.frame.size.width / self.view.bounds.size.width var newScale = currentScale*sender.scale if newScale < 1

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

一世执手 提交于 2019-12-13 04:45:10
问题 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 pinch gesture recognizer that comes with ScrollView). Is there some way that in such cases I can pass my custom gesture recognizer to the ScrollView and it would use that recognizer to scale the view as it normally would? Could I pass the gesture

Creating zoom on UIImageView in swift

巧了我就是萌 提交于 2019-12-13 03:43:06
问题 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 can click on a specific image i will be able to zoom it. I have shared my code below: //Declaration of variables var albumID: String? var imagePath: String? var path: String? var getClickImage = UIImageView() var zoomscrollV = UIScrollView() var