Hello,
Question:
In the default template for Augmented Reality App, if you set content technology to "RealityKit" and User Interface "SwiftUI", why is arView "frame" parameter set to ".zero"?
arView = ARView(frame: .zero)
My understanding of the line of code would be: Creates an AR view with the frame of CGRect whose origin and size are both zero.
To me this mean the View has origin at (0,0) and the size is 0.
I suppect this has to do with SwiftUI parent (ContentView) view defining the view size and position for the child ARViewContainer? But am really taking a guess. I am confused and am asking for help and clarity from the Apple Developer Community.
Reference pages that I am specifically pointing to.
https://developer.apple.com/documentation/realitykit/arview/3243232-init
https://developer.apple.com/documentation/coregraphics/cgrect/1455437-zero
Smartdog
We all learn by sharing what we know