[ 
https://issues.apache.org/jira/browse/WEEX-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16696420#comment-16696420
 ] 

ASF GitHub Bot commented on WEEX-439:
-------------------------------------

wqyfavor closed pull request #1245: [WEEX-439][iOS] Fix bug that list inside 
slider may display incorrectly.
URL: https://github.com/apache/incubator-weex/pull/1245
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm 
b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
index ecca959107..1e4be38240 100644
--- a/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
+++ b/ios/sdk/WeexSDK/Sources/Layout/WXComponent+Layout.mm
@@ -138,6 +138,16 @@ - (void)_frameDidCalculated:(BOOL)isChanged
         __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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> List inside slider may display incorrectly
> ------------------------------------------
>
>                 Key: WEEX-439
>                 URL: https://issues.apache.org/jira/browse/WEEX-439
>             Project: Weex
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 0.17
>         Environment: iOS
>            Reporter: Wang Qianyuan
>            Assignee: acton393
>            Priority: Major
>         Attachments: IMG_0141.PNG
>
>
> {code:java}
> <slider @change="selected"
> class="wxslider" 
> infinite="false"
> v-if="!isWeb"
> :style="{ height: contentHeight}"
> :index = "pageIndex"
> scroll-direction="horizontal">
> <list class="content" v-for="(pageItem, listIndex) in items" :key="listIndex">
> <refresh class="refresh" @refresh="refreshData" :display="refreshing ? 'show' 
> : 'hide'">
> <text class="loading-text">下拉刷新中</text>
> </refresh> 
> <cell class="cell" 
> v-for="(item, itemIndex) in pageItem"
> :key="itemIndex">
> <component :is="'x-' + item.type" 
> :data="item.data"
> :data-spm ="tabItems[listIndex].spmc"
> :spmd="listIndex +'-'+ itemIndex"
> v-on:loadCellData="loadCellData"
> :tabIndex ="listIndex"
> :showTipsView="showTipsView"
> :tabData ="tabItems"
> :index ="itemIndex">
> </component> 
> </cell>
> </list>
> </slider>
> {code}
> Mutliple lists inside a slider. On iOS there is chance that the frame of the 
> first list is incorrect. It looks like the width is screen width divided by 
> N, which N is count of lists.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to