You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ji...@apache.org on 2019/12/10 02:29:25 UTC
[incubator-weex] branch master updated: [iOS] Inherit auto-invert
for embed.
This is an automated email from the ASF dual-hosted git repository.
jianhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new a9b5e9b [iOS] Inherit auto-invert for embed.
new 5c7479f Merge pull request #3069 from wqyfavor/embed-dark-scheme
a9b5e9b is described below
commit a9b5e9b2ea3df7e7a27b8a32a6e7d696f2a97108
Author: qianyuan.wqy <qi...@taobao.com>
AuthorDate: Mon Dec 9 21:17:47 2019 +0800
[iOS] Inherit auto-invert for embed.
---
ios/sdk/WeexSDK/Sources/Component/WXEmbedComponent.m | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXEmbedComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXEmbedComponent.m
index 4c95e51..2ac96a4 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXEmbedComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXEmbedComponent.m
@@ -135,6 +135,13 @@
_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) {