I have a situation where ClassA contains a UIView property. I have two children of ClassA, ChildA and ChildB, both set this UIView property for themselves with two different types of UIView subclasses. I’d like to require that both of these UIView subclasses have a property called maximumDimension, and then I’d like to be able to set it in ClassA using its own UIView property.
What is the best way to accomplish this? Would it be a protocol? If so would someone be able to provide code on how this can be achieved in Objective-C?
Yes:
Then the actual property: