• 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: SpriteKit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SpriteKit


  • Subject: Re: SpriteKit
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 21 Apr 2014 10:00:02 -0700

On Apr 21, 2014, at 08:13 , William Squires <email@hidden> wrote:

> Question: given an SKLabelNode (reference), is there some way to render it, and turn the rendered image into an SKSpriteNode? I know about [SKSprite spriteWithImageNamed:], but that takes a filename of an image in the bundle, not an actual UIImage, and - since one cannot save into the bundle (at runtime) - that nixes that idea...

(a) -[SKView textureFromNode:]

(b) Render the desired content into an actual UIImage, then +[SKTexture textureWithImage:]

Once you have the texture, you can create a SKSpriteNode.

_______________________________________________

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


References: 
 >SpriteKit (From: William Squires <email@hidden>)

  • Prev by Date: Re: ARC Retain Cycles
  • Next by Date: Re: ARC Retain Cycles
  • Previous by thread: SpriteKit
  • Next by thread: Advice for error "NSBundle was released too many times"
  • Index(es):
    • Date
    • Thread