[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

refresh组件的pullingdown事件中的pullingDistance属性在iOS与Android不一致?? #1742

Closed
sinbadmaster opened this issue Nov 13, 2018 · 5 comments

Comments

@sinbadmaster
Copy link

pullingdown事件中的pullingDistance属性取值在iOS端为负值但是在安卓端为正值

@jerryyum
Copy link

确实,我也碰到了,我把ios端的值改为取绝对值了

@zshshr
Copy link
Contributor
zshshr commented Nov 20, 2018

@sinbadmaster Please provide a reproducible demo on the site of http://dotwe.org/vue/

@jerryyum
Copy link

文件 WXScrollerComponent.mm
方法 - (void)scrollViewDidScroll:(UIScrollView *)scrollView
下面这一段代码中,REFRESH_PULLINGDISTANCE 下拉时返回的是负值,而在Android中是正值

    [_refreshComponent pullingdown:@{
             REFRESH_DISTANCE_Y: @(fabs((scrollView.contentOffset.y - _lastContentOffset.y)/scaleFactor)),
             REFRESH_VIEWHEIGHT: @(_refreshComponent.view.frame.size.height/scaleFactor),
             REFRESH_PULLINGDISTANCE: @(scrollView.contentOffset.y/scaleFactor),
             @"type":@"pullingdown"
    }];

@wqyfavor
Copy link
Member

已修复,#2109

@sinbadmaster
Copy link
Author

@wqyfavor 多谢修复这个问题。 @jerryyum 也多谢提供了具体问题位置。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants