From c41c0f55588e5d7ccc28fd7bf791cb940ceacf85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=90=E9=A3=8E?= Date: Wed, 15 Mar 2017 11:23:19 +0800 Subject: [PATCH 1/2] * [ios] fix issue that header at bottom not work --- .../WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m | 5 ++++- .../WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m index f5d641ea84..a959ddca28 100644 --- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m +++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXMultiColumnLayout.m @@ -182,9 +182,12 @@ - (void)prepareLayout self.columnsMaxHeights[column] = @(CGRectGetMaxY(itemAttributes.frame)); } + + currentHeight = [self _maxHeightForAllColumns]; + [self _columnsReachToHeight:currentHeight]; } - currentHeight = [self _maxHeightForAllColumns] + insets.bottom; + currentHeight = currentHeight + insets.bottom; [self _columnsReachToHeight:currentHeight]; self.layoutAttributes[kMultiColumnLayoutHeader] = headersAttributes; diff --git a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m index fd87ce2359..4789291f00 100644 --- a/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m +++ b/ios/sdk/WeexSDK/Sources/Component/Recycler/WXRecyclerComponent.m @@ -506,7 +506,7 @@ - (void)resetLoadmore{ _previousLoadMoreCellNumber = 0; } -#pragma makrk - private +#pragma mark - Private - (float)_floatValueForColumnGap:(WXLength *)gap { @@ -573,7 +573,7 @@ - (void)_fillPadding } } - if (cellArray.count > 0) { + if (cellArray.count > 0 || currentSection.headerComponent) { currentSection.cellComponents = [cellArray copy]; [sectionArray addObject:currentSection]; } From 8896f7770f10bbb1033d0e91686d6a631dafbe0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=90=E9=A3=8E?= Date: Wed, 15 Mar 2017 11:28:28 +0800 Subject: [PATCH 2/2] * [ios] Add footer support to waterfall example --- examples/vue/components/waterfall.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/vue/components/waterfall.vue b/examples/vue/components/waterfall.vue index 0fa64a4234..ab39b7f35e 100644 --- a/examples/vue/components/waterfall.vue +++ b/examples/vue/components/waterfall.vue @@ -49,6 +49,9 @@ {{item.behaviourName}} +
Top
@@ -201,6 +204,12 @@ margin-right: 24; margin-bottom: 30; } + .footer { + height: 94; + justify-content: center; + align-items: center; + background-color: #00cc99; + } .fixedItem { position: fixed;