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 2017/09/14 11:29:01 UTC
[6/8] incubator-weex git commit: * [ios] use weakself to resolve
toast still show while the page is popped
* [ios] use weakself to resolve toast still show while the page is popped
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e44104af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e44104af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e44104af
Branch: refs/heads/0.16-dev
Commit: e44104af2703557289601d496175fe207085dddd
Parents: 317b99d
Author: acton393 <zh...@gmail.com>
Authored: Thu Sep 14 18:46:14 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu Sep 14 18:46:14 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e44104af/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 0f8445a..d3c547c 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXModalUIModule.m
@@ -215,7 +215,7 @@ static const CGFloat WXToastDefaultPadding = 30.0;
[WXToastManager sharedManager].toastingView = toastView;
[superView addSubview:toastView];
-
+ __weak typeof(self) weakSelf = self;
[UIView animateWithDuration:0.2 delay:duration options:UIViewAnimationOptionCurveEaseInOut animations:^{
toastView.transform = CGAffineTransformConcat(toastView.transform, CGAffineTransformMakeScale(0.8, 0.8)) ;
} completion:^(BOOL finished) {
@@ -230,7 +230,7 @@ static const CGFloat WXToastDefaultPadding = 30.0;
[queue removeObjectAtIndex:0];
if (queue.count > 0) {
WXToastInfo *info = [queue firstObject];
- [self showToast:info.toastView superView:info.superView duration:info.duration];
+ [weakSelf showToast:info.toastView superView:info.superView duration:info.duration];
}
}
}];