A view for displaying 3D SceneKit content.
SDKs
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Scene
Kit
Declaration
@interface SCNView : UIView
@interface SCNView : NSView
Overview
In macOS, SCNView
is a subclass of NSView
. In iOS and tvOS, SCNView
is a subclass of UIView
. As part of either operating system’s view hierarchy, an SCNView
object provides a place for SceneKit content in your app’s user interface. You can create a SceneKit view by using its init
method or by adding it to a nib file or storyboard. To provide content for a SceneKit view, assign an SCNScene
object to its scene
property.
For additional important methods and properties for working with SceneKit views, see the SCNScene
protocol. (You can also render SceneKit content into an arbitrary Metal command queue or OpenGL context using the SCNRenderer
class, or into a Core Animation layer on macOS using the SCNLayer
class. The SCNScene
protocol defines functionality common to all three SceneKit rendering classes.)