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

incubator-weex git commit: [WEEX-439][iOS] Fix bug that list inside slider may display incorrectly.

Repository: incubator-weex
Updated Branches:
  refs/heads/master 53534bc64 -> b2afcf9d8


[WEEX-439][iOS] Fix bug that list inside slider may display incorrectly.


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

Branch: refs/heads/master
Commit: b2afcf9d8afbb0d89dbc47ed3ff0be476d40a399
Parents: 53534bc
Author: 神漠 <qi...@alipay.com>
Authored: Thu Jun 7 10:10:01 2018 +0800
Committer: Adam Feng <cx...@gmail.com>
Committed: Thu Jun 7 17:13:55 2018 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b2afcf9d/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
index ecca959..1e4be38 100644
--- a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
+++ b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
@@ -138,6 +138,16 @@ bool flexIsUndefined(float value) {
         __weak typeof(self) weakSelf = self;
         [self.weexInstance.componentManager _addUITask:^{
             __strong typeof(weakSelf) strongSelf = weakSelf;
+            
+            if (strongSelf == nil) {
+                return;
+            }
+            
+            // Check again incase that this property is set to NO in another UI task.
+            if (![strongSelf isViewFrameSyncWithCalculated]) {
+                return;
+            }
+            
             if (strongSelf->_transform && !CATransform3DEqualToTransform(strongSelf.layer.transform, CATransform3DIdentity)) {
                 // From the UIView's frame documentation:
                 // https://developer.apple.com/reference/uikit/uiview#//apple_ref/occ/instp/UIView/frame