weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acton...@apache.org
Subject [1/3] incubator-weex git commit: Dismiss pickerview in dealloc if needed
Date Tue, 04 Jul 2017 11:05:37 GMT
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 532d87ba1 -> e56f343a9


Dismiss pickerview in dealloc if needed

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

Branch: refs/heads/0.15-dev
Commit: 5d1c57c047275aa16062a30d09a14ce5b7971cc3
Parents: 43adf40
Author: gaimanjing <gaimanjing@gmail.com>
Authored: Mon Jun 26 16:33:05 2017 +0800
Committer: GitHub <noreply@github.com>
Committed: Mon Jun 26 16:33:05 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d1c57c0/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m b/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
index 41ec9cc..fe1c4e2 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m
@@ -69,6 +69,13 @@ WX_EXPORT_METHOD(@selector(pickTime:callback:))
 -(void)dealloc
 {
     [NSObject cancelPreviousPerformRequestsWithTarget:self];
+
+    if (nil != _backgroundView.superview) {
+        UIView* backgroundView =  _backgroundView;
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [backgroundView removeFromSuperview];
+        });
+    }
 }
 
 -(void)pick:(NSDictionary *)options callback:(WXModuleCallback)callback


Mime
View raw message