react-native-vision-camera/ios/Parsers/AVCaptureDevice.FlashMode+descriptor.swift
Marc Rousavy 9ea158ad8f
chore: Move to /mrousavy/ (#224)
* rename 1/n

* 2

* 3

* fix indent
2021-06-21 22:42:46 +02:00

28 lines
463 B
Swift

//
// AVCaptureDevice.FlashMode+descriptor.swift
// mrousavy
//
// Created by Marc Rousavy on 15.12.20.
// Copyright © 2020 mrousavy. All rights reserved.
//
import AVFoundation
extension AVCaptureDevice.FlashMode {
init?(withString string: String) {
switch string {
case "on":
self = .on
return
case "off":
self = .off
return
case "auto":
self = .auto
return
default:
return nil
}
}
}