1

I have code of the form

if #available(iOS 10.2, *) {
    device = AVCaptureDeviceType.builtInDualCamera
} else {
    device = AVCaptureDeviceType.builtInDuoCamera
}

Is

if #available(AVCaptureDeviceType.builtInDualCamera) {

... possible?

The latter expresses my intention better — if the value builtInDualCamera exists, use it. I couldn't care less whether it was introduced in iOS 10.1 or .2 or .3.

Kartick Vaddadi
  • 4,818
  • 6
  • 39
  • 55

0 Answers0