Closed douglasjunior closed 1 year ago
@alwx - my RN version is 0.42.2 and I got error for RCTImageFromLocalAssetURL
while building project. Could you review this PR to see whether it could resolve the issue?
@just4fun RN 0.42.x is very old. Try to use an old version of photo-view.
if (RCTIsLocalAssetURL(imageURL)){ UIImage *image = RCTImageFromLocalAssetURL(imageURL); [self setLoadingImage:image]; }
try this
@asolas the problem here, is that in the most recent of React Native version the photo-view never call onLoad
and onLoadEnd
events on iOS.
@just4fun is trying to use this PR with a very older version of React native, it dont work.
Who wants to try this PR, please 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"
@alwx please, could you look to this PR?
@alwx maybe consider adding @douglasjunior as a contributor so he can make releases?
@alwx @zackify's suggestion sounds good. Have you considered it?
This change add onLoad and onLoadEnd for RCTImageFromLocalAssetURL image load.
In the most recent version of RN 0.50.x, it changed the RCTImageFromLocalAssetURL behavior. And then, now RCTImageFromLocalAssetURL also loads images from the web. So, react-native-photo-view is never calling the
onLoad
andonLoadEnd
events.I also opened a issue in RN repository to ask if this is intentional or a bug. facebook/react-native#16800