Skip to content

Instantly share code, notes, and snippets.

@mkeremkeskin
Created November 10, 2020 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkeremkeskin/06e10b890710da9a32388883aca5ffb4 to your computer and use it in GitHub Desktop.
Save mkeremkeskin/06e10b890710da9a32388883aca5ffb4 to your computer and use it in GitHub Desktop.
public enum SelectionType {
case filter
case size
}
public protocol BaseSelectionType {
var selectionType: SelectionType { get }
}
public enum FilterType: String, BaseSelectionType {
case colorDocument
case blackAndWhite
case colorPhoto
case greyscale
public var selectionType: SelectionType {
return SelectionType.filter
}
}
public enum SizeType: String, BaseSelectionType {
case originalSize
case a4
case a5
case bCard
case letter
case legal
public var selectionType: SelectionType {
return SelectionType.size
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment