Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Update WXComponentMethod.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hpop1994 authored May 29, 2019
1 parent 8f5ebf3 commit 78153e9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ios/sdk/WeexSDK/Sources/Bridge/WXComponentMethod.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ - (void)invoke
if (!component) {
WXLogError(@"component not found for ref:%@, type:%@", _componentRef, _componentName);
}
SEL selector = [WXComponentFactory methodWithComponentName:component.type withMethod:self.methodName];
BOOL synchronous = NO;
SEL selector = [WXComponentFactory methodWithComponentName:component.type withMethod:self.methodName isSync:&synchronous];
NSInvocation * invocation = [self invocationWithTarget:component selector:selector];
WXPerformBlockOnMainThread(^{
if (synchronous) {
[invocation invoke];
});
}
else {
WXPerformBlockOnMainThread(^{
[invocation invoke];
});
}
});


Expand Down

0 comments on commit 78153e9

Please sign in to comment.