Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. func focusCamera(point:CGPoint)
  2. {
  3. var screenRect:CGRect = bounds
  4. var focusX = Float(point.x/screenRect.width)
  5. var focusY = Float(point.y/screenRect.height)
  6.  
  7. _currentDevice.lockForConfiguration(nil)
  8. _currentDevice.setFocusModeLockedWithLensPosition(focusX)
  9. {
  10. time in
  11. self._currentDevice.unlockForConfiguration()
  12. }
  13.  
  14. _currentDevice.setFocusModeLockedWithLensPosition(focusY)
  15. {
  16. time in
  17. self._currentDevice.unlockForConfiguration()
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement