1 #import "ITSharedController.h"
3 static NSMutableDictionary *_ITSharedController_sharedControllers = nil;
5 @implementation ITSharedController
7 + (id)sharedController {
8 if (!_ITSharedController_sharedControllers) {
9 _ITSharedController_sharedControllers = [[NSMutableDictionary alloc] init];
12 if (thisController = [_ITSharedController_sharedControllers objectForKey:NSStringFromClass(self)]) {
13 return thisController;
15 thisController = [[self alloc] init];
16 [_ITSharedController_sharedControllers setObject:thisController forKey:NSStringFromClass(self)];
17 return thisController;