ios - Disable Max Zoom -


i'm making camera , has pinch zoom. i'm trying find way disable maximum zoom level. here code...

func pinch(pinch: uipinchgesturerecognizer) {     let device = avcapturedevice.defaultdevicewithmediatype(avmediatypevideo)      let pinchvelocitydividerfactor:cgfloat = 10      if pinch.state == uigesturerecognizerstate.changed {         {             try device.lockforconfiguration()              let desiredzoomfactor = device.videozoomfactor + atan2(pinch.velocity, pinchvelocitydividerfactor)              device.videozoomfactor = max(1, min(desiredzoomfactor, device.activeformat.videomaxzoomfactor))              device.unlockforconfiguration()          } catch {             // handle error             return         }     } } 

is there anyway not have camera have max zoom snapchat? thanks!


Comments

Popular posts from this blog

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -