UIImagePickerController custom overlay and focus transition

Is it possible to display the blue square of touching the focus when the user overlay is used in the UIImagePickerView and when the showCameraControl attribute is set to FALSE?

+3
source share
2 answers

The modal view of the camera already supports touch focus. You must make your overlay look โ€œtransparentโ€ for touch.

Subclass a UIView as an OverlayView and add something like this. In my overlay view, I have two buttons that, of course, should not be transparent to the touch.

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {

    if (CGRectContainsPoint(infoButton.frame, point) || CGRectContainsPoint(snapButton.frame, point)) {
        // touched button
        return YES; 
    }

    return NO;
}

, , . , " " .

+3

- . ,

0

Source: https://habr.com/ru/post/1782415/


All Articles