react-native-vision-camera/ios/Parsers/AVCapturePhotoOutput.QualityPrioritization+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

30 lines
561 B
Swift

//
// AVCapturePhotoOutput.QualityPrioritization+descriptor.swift
// mrousavy
//
// Created by Marc Rousavy on 15.12.20.
// Copyright © 2020 mrousavy. All rights reserved.
//
import AVFoundation
import Foundation
@available(iOS 13.0, *)
extension AVCapturePhotoOutput.QualityPrioritization {
init?(withString string: String) {
switch string {
case "speed":
self = .speed
return
case "quality":
self = .quality
return
case "balanced":
self = .balanced
return
default:
return nil
}
}
}