In my application I want to associate NSMutableDictionary
to all UIElements
(UIButton
, UILable
, etc), I can easily achieve this by subclassing each element, but I just want to know if I can make my own UIControl
subclass -with a property of type NSMutableDictionary
-, as superclass of all programmatically created UIElement
s in anyway, so that I can reduce the number of subclasses.
Here like this
@interface UIControl : MyControls
{
}
@property(nonatomic,retain) NSMutableDictionary *details;
@end
and make MyControls
as superclass of all programmatically created UIElements