alwx / react-native-photo-view

Pinch-to-zoom view for React Native (both iOS and Android)
MIT License
816 stars 434 forks source link

onLoad, onLoadEnd not working on IOS #138

Open aditya-simplecrm opened 6 years ago

aditya-simplecrm commented 6 years ago
                      <PhotoView 
                          source={{uri: this.state.url}} 
                          style={styles.imageWV}
                          onLoad={() => console.log('Image loaded')} 
                      />

onLoad, onLoadEnd not working on IOS. It is working fine on Android.

react-native-cli: 2.0.1 react-native: 0.51.0

wwwdata commented 6 years ago

Can confirm this. Like the sluggish animation, this was also working for me in RN 0.49 and after upgrading to 0.51 it stopped working.

yuoppp commented 6 years ago

facing the same issue with RN 0.52.2

douglasjunior commented 6 years ago

Look my PR #122

drpiou commented 6 years ago

Same here

douglasjunior commented 6 years ago

Who wants to try my solution, use my Fork:

(remember, this will work for RN >= 0.50.0)

"react-native-photo-view": "git+https://github.com/douglasjunior/react-native-photo-view.git#patch-2"
drpiou commented 6 years ago

@douglasjunior your fork works fine for this but add me a white background I cannot change, so basically I switch a bug for an another one ;)

I then did my own fork, with backgroundColor + onLoad/End events, which juste merge PR #127: yarn add git+https://github.com/drpiou/react-native-photo-view.git

douglasjunior commented 6 years ago

@drpiou backgroundColor white is in the current version of react-native-photo-view, so I dont changed that.