|
@@ -54,7 +54,7 @@
|
54
|
54
|
-(RNNUIBarButtonItem*)buildButton: (NSDictionary*)dictionary {
|
55
|
55
|
NSString* buttonId = dictionary[@"id"];
|
56
|
56
|
NSString* title = dictionary[@"title"];
|
57
|
|
- NSString* component = dictionary[@"component"][@"name"];
|
|
57
|
+ NSDictionary* component = dictionary[@"component"];
|
58
|
58
|
|
59
|
59
|
if (!buttonId) {
|
60
|
60
|
@throw [NSException exceptionWithName:@"NSInvalidArgumentException" reason:[@"button id is not specified " stringByAppendingString:title] userInfo:nil];
|
|
@@ -68,7 +68,7 @@
|
68
|
68
|
|
69
|
69
|
RNNUIBarButtonItem *barButtonItem;
|
70
|
70
|
if (component) {
|
71
|
|
- RCTRootView *view = (RCTRootView*)[self.viewController.creator createRootView:component rootViewId:buttonId];
|
|
71
|
+ RCTRootView *view = (RCTRootView*)[self.viewController.creator createRootView:component[@"name"] rootViewId:component[@"componentId"]];
|
72
|
72
|
barButtonItem = [[RNNUIBarButtonItem alloc] init:buttonId withCustomView:view];
|
73
|
73
|
} else if (iconImage) {
|
74
|
74
|
barButtonItem = [[RNNUIBarButtonItem alloc] init:buttonId withIcon:iconImage];
|