-
-
Save anupamchugh/50ad33d0e6d2a8beb4d87532564f1622 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView : View { | |
var body: some View { | |
return ARViewContainer().edgesIgnoringSafeArea(.all) | |
} | |
} | |
struct ARViewContainer: UIViewRepresentable { | |
func makeUIView(context: Context) -> ARView { | |
let arView = ARView(frame: .zero) | |
let config = ARWorldTrackingConfiguration() | |
config.planeDetection = .horizontal | |
arView.session.run(config, options: []) | |
arView.addCoaching() | |
arView.setupGestures() | |
return arView | |
} | |
func updateUIView(_ uiView: ARView, context: Context) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment