From 3ee6275cc0bfa8f6bf84439bff4d8712c7569937 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 23 Oct 2019 20:17:24 +0800 Subject: [PATCH] optimize code --- iOS/Pod/Classes/DoricRegistry.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/iOS/Pod/Classes/DoricRegistry.m b/iOS/Pod/Classes/DoricRegistry.m index 72cefdbf..93204eec 100644 --- a/iOS/Pod/Classes/DoricRegistry.m +++ b/iOS/Pod/Classes/DoricRegistry.m @@ -61,27 +61,27 @@ - (void)innerRegister { } - (void)registerJSBundle:(NSString *)bundle withName:(NSString *)name { - [self.bundles setObject:bundle forKey:name]; + self.bundles[name] = bundle; } - (NSString *)acquireJSBundle:(NSString *)name { - return [self.bundles objectForKey:name]; + return self.bundles[name]; } - (void)registerNativePlugin:(Class)pluginClass withName:(NSString *)name { - [self.plugins setObject:pluginClass forKey:name]; + self.plugins[name] = pluginClass; } - (Class)acquireNativePlugin:(NSString *)name { - return [self.plugins objectForKey:name]; + return self.plugins[name]; } - (void)registerViewNode:(Class)nodeClass withName:(NSString *)name { - [self.nodes setObject:nodeClass forKey:name]; + self.nodes[name] = nodeClass; } - (Class)acquireViewNode:(NSString *)name { - return [self.nodes objectForKey:name]; + return self.nodes[name]; } @end