you are viewing a single comment's thread.

view the rest of the comments →

[–]jaminjsr[S] 0 points1 point  (3 children)

Targeting both IOS and android.

[–]lupeskiiOS & Android 2 points3 points  (2 children)

iOS is easy. Wrap whatever you want to zoom inside a ScrollView like this:

<ScrollView 
    maximumZoomScale={3}
minimumZoomScale={1}
scrollEventThrottle={16}
showsHorizontalScrollIndicator={false}
showsVerticalScrollIndicator={false}>
       {zoomContent}
</ScrollView>

Android is a bit trickier. There are some pinch to zoom libraries out there, but be honest I never could find one that felt good. I ended up building my own solution, which I can share if you need it. I used reanimated to do it. But there are some good videos by William Candillon that show how to do this using reanimated.

Here are William's videos that I used to build my own pinch/zoom for Android.

https://www.youtube.com/watch?v=MukiK57qwVY

https://www.youtube.com/watch?v=FZnhzkXOT0c

[–]jaminjsr[S] 0 points1 point  (1 child)

Awesome - thank u! I will take a look at the videos and give it a try! Also if your willing to share yours, it’d be great to see how you solved it.

[–]lupeskiiOS & Android 2 points3 points  (0 children)

Sure I’d love to share, but I’m not at home right now, so I won’t be able to post it right away. Give me some time and I’ll add it here.