feat:call NativeView's method on UI thread
This commit is contained in:
@@ -152,15 +152,19 @@ - (void)callItem:(NSUInteger)position height:(CGFloat)height {
|
||||
}
|
||||
|
||||
- (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;
|
||||
__block DoricViewNode *ret = nil;
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
for (UITableViewCell *tableViewCell in self.view.visibleCells) {
|
||||
if ([tableViewCell isKindOfClass:[DoricTableViewCell class]]) {
|
||||
DoricListItemNode *node = ((DoricTableViewCell *) tableViewCell).doricListItemNode;
|
||||
if ([viewId isEqualToString:node.viewId]) {
|
||||
ret = node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
});
|
||||
return ret;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user