Created
August 22, 2018 15:12
-
-
Save douglashill/ed9ee678db17337e08fcf739e207286f to your computer and use it in GitHub Desktop.
Compact description of an iOS content size category. Useful for analytics.
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
private extension UIContentSizeCategory { | |
var shortDescription: String { | |
switch self { | |
case .unspecified: return "unspecified" | |
case .extraSmall: return "XS" | |
case .small: return "S" | |
case .medium: return "M" | |
case .large: return "L" | |
case .extraLarge: return "XL" | |
case .extraExtraLarge: return "XXL" | |
case .extraExtraExtraLarge: return "XXXL" | |
case .accessibilityMedium: return "AX M" | |
case .accessibilityLarge: return "AX L" | |
case .accessibilityExtraLarge: return "AX XL" | |
case .accessibilityExtraExtraLarge: return "AX XXL" | |
case .accessibilityExtraExtraExtraLarge: return "AX XXXL" | |
default: return rawValue | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment