matusalem matusalem - 4 months ago 23
iOS Question

RefreshControl sometimes does not hide and acts weirdly on iOS

after upgrading from

react-native@0.26
activity indicator of
RefreshControl
sometimes appears in right corner of
ScrollView
on iOS.
I am using RefreshControl as correctly as documentation says:

...
<ScrollView
style={styles.container}
refreshControl={
<RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this.onPullToRefresh}
/>
}>
<View>
...
</View>
</ScrollView>
...


and here is what sometimes happening while not refreshing:

enter image description here

Now I am running
react-native@0.30.0
and this indicator is still annoying me.

Am I the only who faces this issue?

Answer

Solved by setting background to transparent color...

...
<ScrollView
      style={styles.container}
      refreshControl={
        <RefreshControl
          refreshing={this.state.isRefreshing}
          onRefresh={this.onPullToRefresh}
          style={{backgroundColor: 'transparent'}}
        />
      }>
...
Comments