my situation:
a dashboard controller who register the widgets inside it and automatically builds the view.
widget classes that are going to populate the dashboard, who adopt
<widget>protocol(some informal methods required), and need to be registered in the dashboard class so the dashboard singleton knows who wants to be in.the dashboard class has
+(void)register:(Class<widget>)w;that simply register the classes who wants to be in in an NSArray
I need each widget class to call automatically that method.in c++ i used to make a boolean static variable that i would initialize with that method. Language = objective-c