1

I am using ARSCNView.snapshot() to take a snapshot in my iOS app with a picture as a frame. The picture frame is a UIImageView which is a subview to the ARSCNView. However, I can only get the scene in the taken picture without the image. I also tried to use this method (https://stackoverflow.com/a/45346555/10057340) to render the ARSCNView as an image but I only got the image frame with a white background rather than the image frame with the camera scene. Can anyone suggest a way for doing this? Thanks!! Below is how I used snaphot():

var frameImageView: UIImageView!
var sceneView: ARSCNView!

func takeSnapShot() {
        frameImageView.image = UIImage(named:"frame")
        frameImageView.ishidden = false
        sceneView.addSubView(frameImageView)
        UIImageWriteToSavedPhotosAlbum(sceneView.snapshot(), nil, nil. nil)
}
Azure Leon
  • 11
  • 2

1 Answers1

0

I don't fully understand what you are asking specifically but you might find this video from the WWDC 2017 useful: https://www.youtube.com/watch?v=eBt1p799L3Q Check out the project they make at 18 min.

Mozz
  • 318
  • 2
  • 8