Monday, August 1, 2022
HomeiOS DevelopmentThe best way to not have scrollview "pull to refresh" drag all...

The best way to not have scrollview “pull to refresh” drag all the display screen down on iOS [React Native]


On Android pull to refresh exhibits a loading circle on the display screen. on iOS all the contents of you display screen is shifted down, loading circle seem, then content material shifts again as illustrated under.

(left is iOS instance, proper is android instance)

enter image description here

My query is can I replicate disable the display screen shifting down and again up on iOS? I nonetheless want the pull to refresh performance from scrollview however not the animation that takes place on iOS.

Principally I’ve a prime navbar that’s mounted, I’ve a climate part that’s a part of scroll view.

enter image description here

I would like the climate part to vanish because the consumer scrolls and to refresh when the consumer pulls to refresh. The problem is that solely on iOS pulling to refresh drags the contents of the display screen and the climate part “detaches”. This isn’t a difficulty on android because the pull to refresh animation does not shift the screens contents.

enter image description here

<Display screen unsafe>
    <ScrollView
        refreshControl={<RefreshControl refreshing={isRefreshing} onRefresh={handleRefresh} />}
        keyboardAware
      >
        <AirQuality />

        //...many different parts

    </ScrollView>
</Display screen>

Is there possibly a unique approach to method this? I might respect any insights!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular