Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
UIContentSizeCategory GetValue
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