react-native-pullview [](<a href="https://github.com/greatbsky/react-native-">https://github.com/greatbsky/react-native-</a>[](<a href="https://github.com/greatbsky/react-native-" 下拉刷新react native组件

程序名称:react-native-pullview [](<a href="https://github.com/greatbsky/react-native-">https://github.com/greatbsky/react-native-</a>[](<a href="https://github.com/greatbsky/react-native-"

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

react-native-pullview [](<a href="https://github.com/greatbsky/react-native-">https://github.com/greatbsky/react-native-</a>[](<a href="https://github.com/greatbsky/react-native-" 介绍

这是一个实现下拉刷新的react native组件,可支持android & ios,简单易用!

纯js代码,基于ScrollView封装. 比scrollview更强大,有三个下拉状态: pulling, pullok, pullrelease.
还可以使用refreshControl或提供的相关属性实现类似于scrollview的pull-to-refresh.

Demo

实例项目: https://github.com/greatbsky/react-native-pullview-demo

[](https://github.com/greatbsky/react-native-

pullview/wiki#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)使用方法

  1. 执行npm install react-native-pullview –save

  2. 编写代码:

    import PullView from 'react-native-pullview';
    

    onPullRelease(resolve) {
      //do something
      resolve();
    }


    //sth…

  3. 完整代码: https://github.com/greatbsky/react-native-pullview-demo

[](https://github.com/greatbsky/react-native-

pullview/wiki#%E6%9B%B4%E5%A4%9A%E9%85%8D%E7%BD%AE%E9%A1%B9)更多配置项

下拉效果属性

  1. onPulling: 处于pulling状态时执行的方法

  2. onPullOk: 处于pullok状态时执行的方法

  3. onPullRelease: 处于pullrelease状态时执行的方法

  4. topIndicatorRender: 顶部刷新指示组件的渲染方法, 接受三个参数: ispulling, ispullok, ispullrelease

  5. topIndicatorHeight: 顶部刷新指示组件的高度, 若定义了topIndicatorRender则同时需要此属性

  6. isPullEnd: 是否已经下拉结束,若为true则隐藏顶部刷新指示组件,非必须

普通refreshcontrol相关属性

  • onRefresh: 开始刷新时调用的方法

  • refreshing: 指示是否正在刷新

react-native-pullview [](<a href="https://github.com/greatbsky/react-native-">https://github.com/greatbsky/react-native-</a>[](<a href="https://github.com/greatbsky/react-native-" 官网

https://github.com/greatbsky/react-native-pullview

相关编程语言

BBGestureBack Full screen return gesture(全屏手...
Framework7 或者叫 F7 是全功能的绑定 iOS 7 应用的...
iOS 调试库,支持 iOS8+,无需添加任何代码,方便 i...
DarkModeKit是在Apple官方的深色模式发布之前设计和...
SimpleNote iOS 版客户端。SimpleNote 是一款在多平...
Kivy iOS,此工具旨在为 iOS 编译必要的库以运行应用...