alwx / react-native-photo-view

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

Can't pan horizontally, resizeMode does not work iOS #62

Open markdaws opened 7 years ago

markdaws commented 7 years ago

For some reason I can only scroll the image vertically, if I try to scroll horizontally the image seems to be locked.

Is there some setting I need to change, I don't see anything:

My image size is 3000x2000, also resizeMode="contain" does not seem to do anything on iOS, I would also like to be able to show the full image when the image loads.

jmfurlott commented 7 years ago

To pan horizontally, I had to properly contain my PhotoView component. See here in the examples: https://github.com/alwx/react-native-photo-view/blob/master/example/index.ios.js

Adjusting the stylesheet in container and PhotoView fixed it for me

yongqianvip commented 7 years ago

@markdaws Hi, About 【 resizeMode="contain"】 do you have any idea to make it work properly?

gnprice commented 3 years ago

The maintainer wrote at https://github.com/alwx/react-native-photo-view/issues/98#issuecomment-333112493 :

We currently don't support resizeMode on iOS, only androidScaleType. The situation may change in the future, but what's important is the fact that PhotoView != ImageView and doesn't support most of its properties.

So it seems the situation is that resizeMode on iOS simply isn't currently supported at all.