You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2018/05/08 08:15:14 UTC

incubator-weex git commit: [WEEX-340][iOS]Fix the window problem where weex toast is displayed

Repository: incubator-weex
Updated Branches:
  refs/heads/master 79a046df7 -> 1caeda497


[WEEX-340][iOS]Fix the window problem where weex toast is displayed

Because the APP's keyWindow usually change with the business, weex's toast view should be displayed in the window where weex is located. If the window does not exist, it should displayed on the weex root view.

U can check this [EXAMPLE](http://dotwe.org/vue/3ce829a89653d651aeadf145af3f98a0)
close #1155


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1caeda49
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1caeda49
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1caeda49

Branch: refs/heads/master
Commit: 1caeda497c0c7830b4eb2867780773572eba909e
Parents: 79a046d
Author: jinxiaotong <ji...@alibaba-inc.com>
Authored: Mon May 7 17:23:54 2018 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Tue May 8 16:13:42 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1caeda49/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m b/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
index 2567519..0c9031a 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
@@ -129,7 +129,7 @@ static const CGFloat WXToastDefaultPadding = 30.0;
 - (void)toast:(NSString *)message duration:(double)duration
 {
     WXAssertMainThread();
-    UIView *superView =  [[UIApplication sharedApplication] keyWindow];
+    UIView *superView = self.weexInstance.rootView.window;
     if (!superView) {
         superView =  self.weexInstance.rootView;
     }