Here's a weird but frustrating one:
I'm trying to set a UIImageView subclass's contentMode property to aspect fit (UIViewContentModeScaleAspectFit) using a stylesheet.
All of the below fail and result in the enum value of UIViewContentModeScaleToFill (0) being applied instead:
content-mode: scale-aspect-fit
content-mode: scaleAspectFit
content-mode: scaleaspectfit
content-mode: UIViewContentModeScaleAspectFit
content-mode: 1
However, enum constants with less camel-cased words work just fine, e.g.:
content-mode: top-left
So I'm guessing this is something that happens when more than two camel-cased words are appended to the enum name when naming the constant? For example:
typedef NS_ENUM(NSInteger, MyEnumType) {
MyEnumTypeOne, // works
MyEnumTypeOneTwo, // works
MyEnumTypeOneTwoThree, // will not work?
};
Or maybe it's just based on the total length of the constant name? Any suggestions / workarounds since even using the integer value doesn't seem to work?