From the Apple Docs..
SKView: "An SKView object is a view that displays Sprite Kit content. This content is provided by an SKScene object."
SKSCene: "An SKScene object represents a scene of content in Sprite Kit."
What's the difference? Is an SKScene similar to a view controller and an SKView like a UIView?
The SKView is a UIView subclass. It wraps up Sprite Kit content in a view that can be used like any other Cocoa view. It usually has an associated view controller. That's Sprite Kit's connection with the Cocoa world.
The scene is the root object of the scene graph. It provides callbacks (physics, scene change, update) needed to implement a game. It does not concern itself with anything Cocoa related.
Normally the view remains as is while you can present scenes to swap out game content, for example moving from the menu to the game scene. Internally the view also caches resource files in memory, so as you switch scenes they don't have to reload the same textures.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With