Created
November 10, 2020 13:02
-
-
Save mkeremkeskin/9e9abd6f1d78ad0bf8669fe1bd533314 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum FilterType: String, BaseSelectionType, CaseIterable { | |
case colorDocument | |
case blackAndWhite | |
case colorPhoto | |
case greyscale | |
var getDisplayText: String { | |
switch self { | |
case .colorDocument: | |
return Localizable.filterColorDocument | |
case .blackAndWhite: | |
return Localizable.filterBlackAndWhite | |
case .colorPhoto: | |
return Localizable.filterColorPhoto | |
case .greyscale: | |
return Localizable.filterGreyscale | |
} | |
} | |
} | |
//CaseIterable - allCases example | |
let filterNames: [String] = FilterType.allCases.map({ (type) -> String in | |
return type.getDisplayText | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment