I want to implement a simple pinch to zoom gesture in a QR app.
It seems simple, so I did some researches I found a few possible answers to the problem:
AVCaptureDevice Camera Zoom
How to implement "pinch to zoom" in custom camera
Pinch to zoom camera
Zooming while capturing video using AVCapture in iOS
Unfortunately none of those actually solve it as I wanted, I personally liked the first one (in Objective-C) and I tried to do it in Swift 3.
I posted an answer with the code that I came up with after some tries, other easier/better/simpler solutions are welcomed :)