feat:add HeadView in panel

This commit is contained in:
pengfei.zhou
2019-11-25 11:53:31 +08:00
parent 7ae868591f
commit 3e8c726330
6 changed files with 48 additions and 15 deletions

View File

@@ -23,6 +23,7 @@
#import "DoricShaderPlugin.h"
#import "DoricRootNode.h"
#import "DoricUtil.h"
#import "Doric.h"
#import <JavaScriptCore/JavaScriptCore.h>
@@ -31,13 +32,16 @@
@implementation DoricShaderPlugin
- (void)render:(NSDictionary *)argument {
if(!argument) {
if (!argument) {
return;
}
__weak typeof(self) _self = self;
dispatch_async(dispatch_get_main_queue(), ^{
__strong typeof(_self) self = _self;
[self.doricContext.rootNode render:argument[@"props"]];
[self.doricContext.rootNode also:^(DoricRootNode *it) {
it.viewId = argument[@"id"];
[it render:argument[@"props"]];
}];
});
}

View File

@@ -192,7 +192,7 @@ - (void)onClick:(UIView *)view {
do {
[ret addObject:node.viewId];
node = node.superNode;
} while (node && ![node isKindOfClass:[DoricRootNode class]]);
} while (node);
return [[ret reverseObjectEnumerator] allObjects];
}