开发者

Cropped rectangle doesn't work as expected

开发者 https://www.devze.com 2023-01-11 15:09 出处:网络
I have an NSView to draw a rectangle to crop image, and one NSImageView to be webcam (camera preview window).

I have an NSView to draw a rectangle to crop image, and one NSImageView to be webcam (camera preview window).

I want to put the NSView on the NSImageView.

When I take a picture, it can produce a cropped image automatically.

The problem is that when I don't start the camera preview window, the crop rectangle can drag and resize normally, but when I start the camera preview window, the crop rectangle out of control.

I've implemented drag and resize function by mouse event.

How can I resolve this problem?

8/19 update: My code and program video.

开发者_开发百科

code: gist.github.com/536831

video: http://www.youtube.com/watch?v=DLjuBGHh3f8

Thanks!!


Hmm, maybe one of the views has User Interaction Enabled set to NO (default value for UIImageView, for example)?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号