Skip to content

Commit

Permalink
Merge pull request apache#3069 from wqyfavor/embed-dark-scheme
Browse files Browse the repository at this point in the history
[iOS] Inherit auto-invert for embed.
  • Loading branch information
jianhan-he authored Dec 10, 2019
2 parents fff1284 + a9b5e9b commit 5c7479f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ios/sdk/WeexSDK/Sources/Component/WXEmbedComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ - (void)_renderWithURL:(NSURL *)sourceURL
_embedInstance.pageObject = self.weexInstance.viewController;
_embedInstance.viewController = self.weexInstance.viewController;

if (self.invertForDarkScheme) {
[_embedInstance setAutoInvertingBehavior:WXAutoInvertingBehaviorAlways];
}
else {
[_embedInstance setAutoInvertingBehavior:WXAutoInvertingBehaviorNever];
}

NSString *newURL = nil;

if ([sourceURL.absoluteString rangeOfString:@"?"].location != NSNotFound) {
Expand Down

0 comments on commit 5c7479f

Please sign in to comment.