diff options
Diffstat (limited to 'Captura/Data/OutputFormatSetting.swift')
| -rw-r--r-- | Captura/Data/OutputFormatSetting.swift | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Captura/Data/OutputFormatSetting.swift b/Captura/Data/OutputFormatSetting.swift index fd48f2f..2131caa 100644 --- a/Captura/Data/OutputFormatSetting.swift +++ b/Captura/Data/OutputFormatSetting.swift @@ -20,9 +20,9 @@ enum OutputFormatSetting: Int { case gifOnly = 0 case mp4Only = 1 case all = 2 - + init?(_ string: String) { - switch(string) { + switch string { case "gif": self = .gifOnly case "mp4": @@ -33,17 +33,17 @@ enum OutputFormatSetting: Int { return nil } } - + func shouldSaveGif() -> Bool { return self == .gifOnly || self == .all } - + func shouldSaveMp4() -> Bool { return self == .mp4Only || self == .all } - + func toString() -> String { - switch(self) { + switch self { case .gifOnly: return "gif" case .mp4Only: |