Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func focusCamera(point:CGPoint)
- {
- var screenRect:CGRect = bounds
- var focusX = Float(point.x/screenRect.width)
- var focusY = Float(point.y/screenRect.height)
- _currentDevice.lockForConfiguration(nil)
- _currentDevice.setFocusModeLockedWithLensPosition(focusX)
- {
- time in
- self._currentDevice.unlockForConfiguration()
- }
- _currentDevice.setFocusModeLockedWithLensPosition(focusY)
- {
- time in
- self._currentDevice.unlockForConfiguration()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement