React Native ScrollView is cut off from the bottom in iOS

Emad Salah picture Emad Salah · Jun 18, 2017 · Viewed 8.6k times · Source

I've just encountered a weird issue that I didn't know why it was happening. For some reason, I can't scroll to the bottom of my <ScrollView>.

Here's my code: https://repl.it/Iqcx/0

Thanks!

Answer

Claudio Holanda picture Claudio Holanda · Dec 12, 2019

In my case the issue wasn't flex: 1 or flexGrow: 1, but using padding on ScrollView styles.

So instead of doing this:

<ScrollView style={{padding: 40}}>
  {/* MY CONTENT HERE */}
</ScrollView>

I did this:

<ScrollView>
  <View style={{padding: 40}}>
    {/* MY CONTENT HERE */}
  </View>
</ScrollView>

And the problem was fixed.

So if you want to add padding to your ScrollView, create a View inside it and apply padding to it instead.