react-native-photo-view icon indicating copy to clipboard operation
react-native-photo-view copied to clipboard

onLoad, onLoadEnd not working on IOS

Open aditya-simplecrm opened this issue 7 years ago • 7 comments

                      <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

aditya-simplecrm avatar Dec 20 '17 09:12 aditya-simplecrm

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.

wwwdata avatar Jan 12 '18 15:01 wwwdata

facing the same issue with RN 0.52.2

yuoppp avatar Jan 29 '18 16:01 yuoppp

Look my PR #122

douglasjunior avatar Feb 02 '18 12:02 douglasjunior

Same here

drpiou avatar Feb 19 '18 10:02 drpiou

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"

douglasjunior avatar Feb 19 '18 12:02 douglasjunior

@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

drpiou avatar Feb 20 '18 08:02 drpiou

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

douglasjunior avatar Feb 20 '18 14:02 douglasjunior