$ npm install react-native-pull-refresh-view --save
$ react-native link react-native-pull-refresh-view
Drag LNRefresh.bundle to Resources
- Drag DWRefreshManager.xcodeproj to your project on Xcode.
- Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libDWRefreshManager..a from the Products folder inside the DWRefreshManager.xcodeproj.
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.view.smartrefresh.RNSmartRefreshPackage;
to the imports at the top of the file - Add
new RNSmartRefreshPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-pull-refresh-view' include ':react-native-pull-refresh-view:tptrrefresh' project(':react-native-pull-refresh-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pull-refresh-view/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-pull-refresh-view')
import PullToRefreshScrollView from 'react-native-pull-refresh-view';
<PullToRefreshScrollView
refreshing={this.state.refreshing}
onRefresh={this.onPullRefresh.bind(this)}}>
</PullToRefreshScrollView>