简体   繁体   English

Xcode iOS-旋转/缩放UIImageView并在右上角带有“锚”吗?

[英]Xcode iOS - Rotate/scale UIImageView with an “anchor” at top right?

I am building an image editing program that places "stamps" over images. 我正在构建一个图像编辑程序,该程序将“戳记”放置在图像上。

I've successfully added image views as stamps to a photo and can re-position/scale/rotate these stamps (image views) using pinch gesture recognizers. 我已经成功地将图像视图作为图章添加到照片中,并且可以使用捏合手势识别器重新定位/缩放/旋转这些图章(图像视图)。

However when the stamp gets too small, it becomes impossible to fit two fingers over the stamp to resize or rotate. 但是,当印章变得太小时,就无法将两个手指放在印章上以调整大小或旋转。

I've noticed similar types of apps use some sort of "anchor" or icon at the top-right corner of the stamp's frame that you can drag with one finger that achieves this same scale/rotate effect (as opposed to using pinching gestures). 我注意到类似类型的应用程序在图章框架的右上角使用某种“锚”或图标,您可以用一个手指拖动它来实现相同的缩放/旋转效果(与使用捏手势不同) 。

Is there a specific term for this "anchor" or a term for this kind of scale/rotate procedure? 这个“锚”是否有特定术语,或者这种缩放/旋转过程是否有术语? I'm having trouble searching for help on this particular kind of feature. 我在寻求有关此特定功能的帮助时遇到了麻烦。

If anyone might know of any prebuilt classes or links to pages describing how to implement this kind of feature, that would be a huge help! 如果有人知道任何预构建的类或指向描述如何实现这种功能的页面的链接,那将是巨大的帮助!

I am attaching an animated GIF to help illustrate what I am trying to implement. 我附上动画GIF,以帮助说明我要实现的内容。

Thanks! 谢谢!

在此处输入图片说明

Okay after I posted this question I checked out some of the Related questions and I stumbled upon a module called ZDStickerView. 好的,在我发布此问题之后,我检查了一些相关问题,然后偶然发现了一个名为ZDStickerView的模块。 After playing around with it I think it will work perfectly for my application. 在试用之后,我认为它将非常适合我的应用程序。

https://www.cocoacontrols.com/controls/zdstickerview https://www.cocoacontrols.com/controls/zdstickerview

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM