Custom camera zoom features on iPhone

I am new to Xcode. I am trying to design a custom overlay camera. I can download this well and it works great.

Now I want to add the zoom function activated by the button in the overlay window.

Can anyone visit me? I am trying to figure out how to enlarge the camera, but I did not find anything.

thanks

0
source share
1 answer

You can use the cameraViewTransform property:

cameraViewTransform Convert to apply to camera preview image.

@property (non-atomic) CGAffineTransform cameraViewTransform Talk conversion affects real-time preview only image and does not affect your custom blend mode or default image controls. You can use this property in combination with custom controls to implement your own electronic scaling behavior.

You can access this property only when the source type of the image picker is set to UIImagePickerControllerSourceTypeCamera. Attempting to access this property for other types of sources results in throwing an NSInvalidArgumentException.

Availability Available in iOS 3.1 and later. Announced in UIImagePickerController.h

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html

+2
source

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


All Articles