Sunday, October 15, 2017

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

Leave a Comment

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

2 Answers

Answers 1

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

Answers 2

Try This:

<Swiper*emphasized text* height={300} removeClippedSubviews={false}>     <View style={{flex: 1, backgroundColor: 'red'}}><Image style={{  flex: 1 }} source={{uri: 'https://s3.eu-central-1.amazonaws.com/xxxxxxx'}}   /></View> </Swiper> 
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment