1.
<ScrollView
refreshControl={
<RefreshControl
refreshing={
this.state.isRefreshing}
onRefresh={
this._onRefresh.bind(
this)}
tintColor=
"#ff0000"
title=
"加载中..."
titleColor=
"#00ff00"
colors={[
'#ff0000',
'#00ff00',
'#0000ff']}
progressBackgroundColor=
"#ffffff"
/>
}
onScroll={
this._onScroll.bind(
this)}
scrollEventThrottle={
50}
>
2.
// 下拉刷新
_onRefresh(){
this.setState({isRefreshing:
true});
setTimeout(() => {
this.setState({
isRefreshing:
false,
});
},
2000);
}