iPhone iOS如何创建交互式拖动,旋转,调整大小,删除视图控件? [英] iPhone iOS how to create interactive drag, rotate, resize, delete view control?

查看:135
本文介绍了iPhone iOS如何创建交互式拖动,旋转,调整大小,删除视图控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个允许用户向画布添加内容的应用。我希望能够为用户提供移动,旋转,调整大小,反映此内容的能力。目前我正在用手势做这个,但想知道是否有某种开源小部件在视图周围绘制一个框并添加4个按钮来执行这些功能:

I got an app that allows users to add content to a canvas. I would like to be able to offer the user an ability to move, rotate, resize, reflect this content. Currently I'm doing this with gestures, but would like to know if there is some sort of open-source widget that draws a box around the view and adds 4 buttons to do these functions:


  • 旋转90度

  • 自由旋转

  • 调整大小

  • delete

  • rotate 90 degrees
  • rotate freely
  • resize
  • delete

任何人都可以想到我可以添加到我的项目中的开源框架来创建像显示的那样的控件?

我可以手工制作,但调试手势识别器和查看旋转并不是最有趣的事情,所以我正在寻找更精美的东西。

I can probably build this by hand, but debugging gesture recognizers and view rotation is not the most fun thing, so I'm looking for something more polished.

谢谢!

推荐答案

这是一个关于cocoa控件的开源控件的链接看起来像你可以使用的东西: TDResizer查看

Here's a link to an open source control on cocoa controls that looks like something you could use: TDResizerView.


TDResizerView用于调整大小并用单指旋转图像视图

"TDResizerView is used to resize and rotate an imageview with single finger"

听起来像个好地方,即使你需要修改它。
我从来没有使用过这个特定的控制,所以请相信我的价值。

Sounds like a good place to start from, even if you need to modify it. I've never used this particular control though, so take my word for what it's worth.

编辑同时保持请注意,在iOS上,用户通常期待手势。强制他们使用手柄而不是捏或旋转可能对您的用户体验有害,这取决于您想要手柄的原因。

edit: Also keep in mind that on iOS, users generally expect gestures. Forcing them to use the handles instead of pinching or rotating may be bad for your user experience, depending on why you want the handles instead.

这篇关于iPhone iOS如何创建交互式拖动,旋转,调整大小,删除视图控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆