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 2017/03/05 11:19:15 UTC

[11/29] incubator-weex git commit: * [ios] reloadData to reload cells whose layout attributes are invalid

* [ios] reloadData to reload cells whose layout attributes are invalid


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

Branch: refs/heads/0.11-dev
Commit: 202321a805529619c4dd56c3c60cc75aa82c10ea
Parents: 2e2b3b4
Author: \u9690\u98ce <cx...@gmail.com>
Authored: Thu Feb 23 17:53:16 2017 +0800
Committer: \u9690\u98ce <cx...@gmail.com>
Committed: Thu Feb 23 17:53:16 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m | 1 -
 ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/202321a8/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m
index d5a1512..d6f9cdb 100644
--- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m
+++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m
@@ -178,7 +178,6 @@ NSString * const kMultiColumnLayoutCell = @"WXMultiColumnLayoutCell";
             CGFloat x = insets.left + (columnWidth + columnGap) * column;
             CGFloat y = [self.columnsMaxHeights[column] floatValue];
             itemAttributes.frame = CGRectMake(x, y, columnWidth, itemHeight);
-            itemAttributes.zIndex = 0;
             cellAttributes[indexPath] = itemAttributes;
             
             self.columnsMaxHeights[column] = @(CGRectGetMaxY(itemAttributes.frame));

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/202321a8/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
index 318900f..f4cf51e 100644
--- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m
@@ -174,6 +174,7 @@ typedef enum : NSUInteger {
                 [component setNeedsLayout];
             }
             
+            [self.collectionView reloadData];
             [self.collectionView.collectionViewLayout invalidateLayout];
         }
     }