02fentym
02fentym

Reputation: 1772

Using AppKit With SpriteKit

Since I've learned Objective C I've only used the SpriteKit project template. I've had a tiny bit of exposure to iOS development and I'm looking to use AppKit elements (buttons, etc) in an OS X SpriteKit project for menu creation, overlays or having more flexibility in terms of placing items on the screen. Is this possible and if so, how? Would it be something along the lines of layering views (NSView overtop of an SKView) or something like that?

Upvotes: 0

Views: 187

Answers (1)

Epic Byte
Epic Byte

Reputation: 33958

It's basically the same as iOS. You can use NSWindowController and NSViewController to hold an SKView and place elements above the view.

In my case I actually just ended up using Sprite Kit for all of the UI because I didn't want to have to mange two separate interfaces.

I recommend that you don't use the Sprite Kit template but instead use the default Cocoa App Template because it uses newer interface technologies that will make designing your interface easier and more similar to iOS.

Upvotes: 1

Related Questions