How to detect autofocus feature on device

Discussion in 'iOS Programming' started by Narendar Singh, Jun 22, 2012.

  1. Narendar Singh macrumors member

    Narendar Singh

    Joined:
    Jun 22, 2012
    Location:
    INDIA
    #1
    I am working on Barcode scanner. For that I need to check whether device has Autofocus feature support or not. How to check this?

    I have following device to run and test this AutoFocus support.

    1. iPad
    2. iPad 2
    3. iPhone 3G
    4. iPhone 3GS
    5. iPhone 4
    6. iPhone 4S
    7. iPod 1st Generation
    8. iPod 4th Generation

    any code snippet would be helpful for me.
     
  2. ahan.tm macrumors regular

    Joined:
    Jun 26, 2011
    Location:
    Florida
    #2
    Why don't you just check the device against a list of devices that have autofocus? I think all devices after the 3GS have autofocus.
     
  3. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #3
    I think you want to use isFocusModeSupported: in the AVCaptureDevice class.
     
  4. Narendar Singh thread starter macrumors member

    Narendar Singh

    Joined:
    Jun 22, 2012
    Location:
    INDIA

Share This Page