Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swiper doesn't show Image (from URI) until scrolling

Tags:

react-native

I have a Swiper with one Image-children (the same problem when I have multiple images as children). If I navigate to this screen I except to see the image.

But: The swiper area is black (invisible) until I scroll down a little bit. If I scroll, the image get loaded.

<Swiper height={300} >
    <View style={{flex: 1, backgroundColor: 'red'}}><Image style={{ flex: 1 }} source={{uri: 'https://s3.eu-central-1.amazonaws.com/xxxxxxx'}} /></View>
</Swiper>

I am using the iOS Simulator with the following versions:

react-native-swiper v1.5.13

react-native v0.46.4

like image 221
rakete Avatar asked Oct 06 '17 21:10

rakete


1 Answers

Adding removeClippedSubviews={false} to the Swiper solved the problem.

like image 56
rakete Avatar answered Oct 11 '22 06:10

rakete