react-native-photo-view
react-native-photo-view copied to clipboard
iOS Compatibility
Any plans on making this a little more iOS compatible? There are a few things that do not work with it including: scale, scaleType (only available for android currently), panning the image.
Here is an example code snippet that I have been having issues with:
<PhotoView
source={map}
scale={0.75}
minimumZoomScale={0.5}
maximumZoomScale={3}
androidScaleType="fitCenter"
onLoad={() => console.log("Image loaded!")}
style={{flex: 1}}
/>
did you find a solution ?
Unfortunately I did not. I will have to take another look at it soon as it's going to be relevant in our project again, so I will be sure to post a solution. For iOS we just hardcoded the size, which was not the most ideal solution.
ok thanks. I think i cannot do this because images have differents size.
I am able to pan, but only after pinching to zoom. Pan is locked up until the pinch gesture. Edit: Looks like that's intentional, but it feels wrong: https://github.com/alwx/react-native-photo-view/blob/master/ios/RNPhotoView.m#L209-L210