• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Superimposing NSViews over an SKView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Superimposing NSViews over an SKView


  • Subject: Re: Superimposing NSViews over an SKView
  • From: Eric Wing <email@hidden>
  • Date: Thu, 31 Oct 2013 02:02:46 -0700

On 10/30/13, Charles Srstka <email@hidden> wrote:
> In Apple's Sprite Kit documentation, it claims:
>
> "Because Sprite Kit content is rendered by a view object, you can combine
> this view with other views in the view hierarchy. For example, you can use
> standard button controls and place them above your Sprite Kit view. Or, you
> can add interactivity to sprites to implement your own buttons; the choice
> is up to you."
>
> https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG/GettingStarted/GettingStarted.html
>
> However, I have so far had no success getting NSButtons and other
> NSView-based views to appear on top of an SKView. I've tried making the view
> a subview of the SKView, making it an overlapping sibling view, building it
> programmatically, putting it in the XIB — in all cases, the NSView-based
> object is not drawn.
>
> Am I missing something here? Is there some flag somewhere that I need to set
> for this to work? Or is the documentation here incorrect?
>
> Thanks,
> Charles
>

I haven't tried it myself, but stupid question, did you remember to
enable layer backed views?

I've spent many years trying to get native controls to render on top
of (non-SpriteKit) OpenGL and there's always something that goes
wrong. In the past couple of years I shifted over to CAOpenGLLayer
instead of NSOpenGLView. That also had a list of problems, but in the
end (and after multiple Apple bug fixes), it was working much better
for me. But I guess I should assume Apple didn't provide a SKLayer
class.

Thanks,
Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Superimposing NSViews over an SKView
      • From: Charles Srstka <email@hidden>
References: 
 >Superimposing NSViews over an SKView (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: 10.9: Some Async Saving is ON even if you say NO?
  • Next by Date: NSSearchField and CR
  • Previous by thread: Superimposing NSViews over an SKView
  • Next by thread: Re: Superimposing NSViews over an SKView
  • Index(es):
    • Date
    • Thread