'How to get location of a view- swiftUI

I want to track location of a view on drag gesture which belongs to a ZStack. So that I can zoom in or out my view . So what is the best way to get location of a view.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source