使用UITouch移动CGRect(Move CGRect with UITouch)

编程入门 行业动态 更新时间:2024-10-26 16:27:28
使用UITouch移动CGRect(Move CGRect with UITouch)

所以我的代码使用CIFaceFeature进行面部检测,并在面部绘制CGRect。 我试图让用户移动矩形,以便使用UITouch进行任何微小的调整。 但到目前为止,我无法这样做。 我找到了这个如何用UITouches移动CGRect? 但它没有帮助。

我已经尝试将CGRect作为UIView的子视图并使用此处提到的代码实现它UIView拖动(图像和文本)但它无法正常工作。

任何帮助将不胜感激谢谢。

So my code uses the CIFaceFeature for face detection and draws a CGRect around the face. I am trying to enable the user to move the rect around for any minor adjustments to be made using UITouch. But so far I'm unable to do so. I found this How can I move CGRect with UITouches? but it hasn't helped.

I've tried making the CGRect a subview of UIView and implementing it using the code mentioned here UIView drag (image and text) but it isn't working.

Any help would be appreciated thanks.

最满意答案

我有一个示例项目

https://github.com/slysid/iOS/tree/master/FaceView

我想,这可能会给你一个想法

巴拉斯

I have a sample project in

https://github.com/slysid/iOS/tree/master/FaceView

I think, this is might give you an idea

Bharath

更多推荐

本文发布于:2023-07-24 00:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1239140.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:UITouch   CGRect   Move

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!