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

iOS Compatibility

Open ekimlinger opened this issue 8 years ago • 4 comments

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}}
          />

ekimlinger avatar Jun 27 '17 04:06 ekimlinger

did you find a solution ?

alainib avatar Oct 25 '17 13:10 alainib

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.

ekimlinger avatar Oct 25 '17 14:10 ekimlinger

ok thanks. I think i cannot do this because images have differents size.

alainib avatar Oct 25 '17 14:10 alainib

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

computerjazz avatar Dec 08 '17 20:12 computerjazz