SamuKata
kavsoft
kavsoft

patreon


Pinch to Zoom | SwiftUI | iOS 17 | Xcode 15

Source Code For Pinch to Zoom | SwiftUI | iOS 17 | Xcode 15.

Download Code 👇

Pinch to Zoom | SwiftUI | iOS 17 | Xcode 15

Comments

I also want to know how to do that.

Sven Ulcar

How might we modify this so that the image stays in place after releasing the touch gesture? I'm looking to use this on a fullsize view of photos, much like the iOS photos app lets you zoom & pan simultaneously. I've played with the code for this but haven't had luck keeping the view from restting to the origin position/size.

Brendan Gallagher

Does this still work for IOS 18?

Caio

I got some errors related to maxHeight. And ZoomContainerData is miscalculating the height. I'm applying it to images of various sizes

Bao Ha

Hi, I mistakenly added it to the else part too. Now the code is updated. Thanks for the information!

Kavsoft

Check this one, https://www.patreon.com/posts/97653817?utm_campaign=postshare_creator

Kavsoft

Can we request specific things to be made in future?

Kieran Lynch

Would it be possible to extend this and provide a mechanism so that when you tap the card it zooms to full screen like a hero animation would?

Tim Elery

The image cannot reset after zoomed need remove ` guard containerData.isResetting else { return }`

Wing CHAN

🙏🏼

Prikshit gupta


More Creators