feat:add nativeChannel on Android

This commit is contained in:
pengfei.zhou
2019-11-18 16:33:23 +08:00
parent 7d0ecfee52
commit 99c994b11b
7 changed files with 139 additions and 3 deletions

View File

@@ -159,4 +159,14 @@ - (void)blendSubNode:(NSDictionary *)subModel {
}
}];
}
- (DoricViewNode *)subNodeWithViewId:(NSString *)viewId {
for (DoricViewNode *viewNode in self.childNodes) {
if ([viewId isEqualToString:viewNode.viewId]) {
return viewNode;
}
}
return nil;
}
@end

View File

@@ -150,4 +150,17 @@ - (void)callItem:(NSUInteger)position height:(CGFloat)height {
[self.view reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
}];
}
- (DoricViewNode *)subNodeWithViewId:(NSString *)viewId {
for (UITableViewCell *tableViewCell in self.view.visibleCells) {
if ([tableViewCell isKindOfClass:[DoricTableViewCell class]]) {
DoricListItemNode *node = ((DoricTableViewCell *) tableViewCell).doricListItemNode;
if ([viewId isEqualToString:node.viewId]) {
return node;
}
}
}
return nil;
}
@end

View File

@@ -32,4 +32,6 @@
- (void)setSubModel:(NSDictionary *)model in:(NSString *)viewId;
- (void)clearSubModel;
- (DoricViewNode *)subNodeWithViewId:(NSString *)viewId;
@end

View File

@@ -122,4 +122,7 @@ - (void)clearSubModel {
[self.subNodes removeAllObjects];
}
- (DoricViewNode *)subNodeWithViewId:(NSString *)viewId {
return nil;
}
@end

View File

@@ -220,4 +220,12 @@ - (void)requestLayout {
[self.superNode requestLayout];
}
- (NSNumber *)getWidth {
return @(self.view.width);
}
- (NSNumber *)getHeight {
return @(self.view.height);
}
@end