Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you screenshot an ARKit camera view?

Tags:

ios

swift

arkit

Looking for a way to capture a screenshot or video of the ARScene without the buttons and other subviews

Traditional screen capture captures everything visible on the screen including UI controls

like image 992
carbonr Avatar asked Sep 02 '17 07:09

carbonr


1 Answers

ARSCNViews have a built in snapshot method that returns a UIImage of the ARScene

So in Objective-C you could do:

UIImage *image = [sceneView snapshot];

and in Swift

var image = sceneView.snapshot()
like image 122
Alan Avatar answered Nov 17 '22 19:11

Alan