title: How to implement Pinch To Zoom in camera (Swift 3)?
body: <p>I want to implement a simple pinch to zoom gesture in a QR app.<br>
  It seems simple, so I did some researches I found a few possible answers to the problem:</p>
  
  <p><a href="https://stackoverflow.com/questions/10220958/avcapturedevice-camera-zoom">AVCaptureDevice Camera Zoom</a><br>
  <a href="https://stackoverflow.com/questions/35246222/how-to-implement-pinch-to-zoom-in-custom-camera">How to implement &quot;pinch to zoom&quot; in custom camera</a><br>
  <a href="https://stackoverflow.com/questions/33180564/pinch-to-zoom-camera">Pinch to zoom camera</a><br>
  <a href="https://stackoverflow.com/questions/27373243/zooming-while-capturing-video-using-avcapture-in-ios">Zooming while capturing video using AVCapture in iOS</a></p>
  
  <p>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.</p>
  
  <p>I posted an answer with the code that I came up with after some tries, other easier/better/simpler solutions are welcomed :)</p>