Specifically, I would like to add a variable of type enum to an instance of UIView, without subclassing or create an extension.
Thanks.
You can use the objc_setAssociatedObject() function from the Objective-C runtime to attach an object (you can wrap that enum into an object) onto another object, and objc_getAssociatedObject() to retrieve it.
objc_setAssociatedObject()
objc_getAssociatedObject()