-
-
Save VincentDondain/2a92f52e756775fe5d211cdf774aa6f0 to your computer and use it in GitHub Desktop.
UIContentSizeCategory GetValue
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 static UIContentSizeCategory GetValue (NSString constant) | |
{ | |
if (constant == null) | |
throw new ArgumentNullException (nameof (constant)); | |
else if (constant == UIContentSizeCategoryUnspecified) | |
return UIContentSizeCategory.Unspecified; | |
else if (constant == UIContentSizeCategoryExtraSmall) | |
return UIContentSizeCategory.ExtraSmall; | |
else if (constant == UIContentSizeCategorySmall) | |
return UIContentSizeCategory.Small; | |
else if (constant == UIContentSizeCategoryMedium) | |
return UIContentSizeCategory.Medium; | |
else if (constant == UIContentSizeCategoryLarge) | |
return UIContentSizeCategory.Large; | |
else if (constant == UIContentSizeCategoryExtraLarge) | |
return UIContentSizeCategory.ExtraLarge; | |
else if (constant == UIContentSizeCategoryExtraExtraLarge) | |
return UIContentSizeCategory.ExtraExtraLarge; | |
else if (constant == UIContentSizeCategoryExtraExtraExtraLarge) | |
return UIContentSizeCategory.ExtraExtraExtraLarge; | |
else if (constant == UIContentSizeCategoryAccessibilityMedium) | |
return UIContentSizeCategory.AccessibilityMedium; | |
else if (constant == UIContentSizeCategoryAccessibilityLarge) | |
return UIContentSizeCategory.AccessibilityLarge; | |
else if (constant == UIContentSizeCategoryAccessibilityExtraLarge) | |
return UIContentSizeCategory.AccessibilityExtraLarge; | |
else if (constant == UIContentSizeCategoryAccessibilityExtraExtraLarge) | |
return UIContentSizeCategory.AccessibilityExtraExtraLarge; | |
else if (constant == UIContentSizeCategoryAccessibilityExtraExtraExtraLarge) | |
return UIContentSizeCategory.AccessibilityExtraExtraExtraLarge; | |
throw new NotSupportedException (constant + " has no associated enum value in " + nameof (UIContentSizeCategory) + " on this platform."); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment