Get CGRect of View

Update: improved and simplified a possible solution to read rect of any view in any coordinate space via helper extension. Works since Xcode 11.1, retested with Xcode 13.3. Main part: func rectReader(_ binding: Binding<CGRect>, _ space: CoordinateSpace = .global) -> some View { GeometryReader { (geometry) -> Color in let rect = geometry.frame(in: space) DispatchQueue.main.async … Read more