我想要一个方法来创建一个新对象或返回一个基于标识符字符串的现有对象。这是我的:@implementationMyObject{}@synthesizedata=_data;-(instancetype)init{self=[superinit];if(self){}returnself;}//thesemethodsaretheonlyonestobeusedformanagingtheMyObjectlifecycle+(NSMutableDictionary*)objectsDict{staticNSMutableDictionary*map=nil;staticdispatch_