Created
October 20, 2016 08:14
Revisions
-
Kureev created this gist
Oct 20, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ #import <Foundation/Foundation.h> @interface EBUIManager : NSObject + (instancetype)sharedInstance; - (void)addValue:(id)value forKey:(NSString *)key; @end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #import "EBUIManager.h" @implementation EBUIManager NSMutableDictionary *registry; + (instancetype)sharedInstance { static EBUIManager *sharedInstance = nil; @synchronized (self) { if (!sharedInstance) { sharedInstance = [[self alloc] init]; registry = [NSMutableDictionary new]; } } return sharedInstance; } - (void)addValue:(id)value forKey:(NSString *)key { [registry setValue:value forKey:key]; } @end