所以我的代码使用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
更多推荐
发布评论