Hi, so I have been learning SwiftUI for a while. Recently, I have been facing this and have not been able to find a solution for it. I have noticed that when GeometryReader is enclosed inside a NavigationView then width and height of size are both 0.
This issue can be fixed if NavigationView is enclosed inside GeoemetyReader but it won't fix my issue as I plan to load another view which has GeometryReader inside it and it must be loaded inside NavigationView
Thanks
Code Block var body: some View { NavigationView { GeometryReader { geometryProxy in VStack { ZStack { /* Here size.width and size.height are both 0 */ draw_lines_of_quadrant(screen_width: geometryProxy.size.width, screen_height: geometryProxy.size.height) } } } } }
This issue can be fixed if NavigationView is enclosed inside GeoemetyReader but it won't fix my issue as I plan to load another view which has GeometryReader inside it and it must be loaded inside NavigationView
Thanks