The Kraken The Kraken - 1 year ago 312
iOS Question

AVCaptureDevice Camera Zoom

I have a simple AVCaptureSession running to get a camera feed in my app and take photos. How can I implement the 'pinch to zoom' functionality using a

for the camera?

Answer Source

Many have tried to do this by setting the transform property on the layer to CGAffineTransformMakeScale(gesture.scale.x, gesture.scale.y); See here for a full fledged implementation of pinch-to-zoom.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download