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

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -