-2

I'm having trouble understanding the difference between these two concepts - they both seem to work in very similar ways and seem to be doing the exact same thing. This is what I've understood so far:

Scenes: Whats "on" the screen. The individual components of the scene are "SKNodes". For instance, a sprite would be an "SKSpriteNode".

Views: Individual components of the screen (i.e. a text box). Isn't this what an SKNode is though?

So what's the difference between an SKNode and a View?

sangony
  • 11,636
  • 4
  • 39
  • 55
dfsdf
  • 281
  • 1
  • 3
  • 6

1 Answers1

0

A view is just that, something that sees other things. A SKNode is an object that gets added to the view. SKNode is the base/root class for virtually all other types of nodes.

As Apple puts it:

The SKNode class is the fundamental building block of most Sprite Kit content. The SKNode class doesn’t draw any visual content. Its primary role is to provide baseline behavior that the other node classes use. All visual elements in a Sprite Kit-based game are drawn using predefined SKNode subclasses.

Read the SKNode documentation for a more detailed description and insight.

sangony
  • 11,636
  • 4
  • 39
  • 55