I'm trying to take a screen shot of my current SKScene
and apply filters to it as a background element when a message box pops in my game. I think this is the most efficient way to do this...
- Take screen shot of the current app state
- Pass this to my message box class
- Run blur filters, darken it
- Add it (as a texture or image) behind my my message box layer and over the current contents of the app
- draw the message on top of it
I know there is a UIView
method - drawViewHierarchyInRect:afterScreenUpdates:
that will capture the contents of the UIView
with my SKScene
in it - but how would I convert the resulting UIImage
into something I can use in SpriteKit
? I really don't need the whole UIView
, just my current SKScene
.
Appreciate any tips or feedback about what I'm doing. Thanks!