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)
}