Pinch to Zoom | SwiftUI | iOS 17 | Xcode 15
🕑 Added 2024-03-28 14:58:59 +0000 UTCSource Code For Pinch to Zoom | SwiftUI | iOS 17 | Xcode 15.
Download Code 👇
Comments
Sven Ulcar
I also want to know how to do that.
Brendan Gallagher
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.
Caio
Does this still work for IOS 18?
Bao Ha
I got some errors related to maxHeight. And ZoomContainerData is miscalculating the height. I'm applying it to images of various sizes
Kavsoft
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
Kieran Lynch
Can we request specific things to be made in future?
Tim Elery
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?
Wing CHAN
The image cannot reset after zoomed need remove ` guard containerData.isResetting else { return }`
Prikshit gupta
🙏🏼