nicklockwood / FXBlurView

[DEPRECATED]
Other
4.94k stars 713 forks source link

Doesn't seem to work with SpriteKit #2

Open CocoaPriest opened 11 years ago

CocoaPriest commented 11 years ago

can't post example due to NDA...

nicklockwood commented 11 years ago

It's probably because it uses [layer renderInContext:] which doesn't work with opengl content, instead of the equivalent iOS7 [view <redacted>] method which should work with anything.

But to be honest, if you're just targeting iOS7 and above, you'd be better off using the UIToolbar layer trick to do your blurring instead (google it).

For SpriteKit content, there may be an approach using shaders or CIFilters that would be more efficient (not 100% sure as I've not read much of the SpriteKit docs yet).

CocoaPriest commented 11 years ago

ah, thanks. Yeah, I saw the UIToolbar-solution, but we have to wait how Apple reacts to it

nicklockwood commented 11 years ago

I can't see that they'd have a problem with it. It doesn't use any private APIs.

nicklockwood commented 11 years ago

Failing that though, if you modify the library to use the aforementioned new iOS 7 method (should be obvious - it's a one-line change) then it should solve your issue.

CocoaPriest commented 11 years ago

yeah, I know what you mean, I'll try it out. Thanks!

nicklockwood commented 11 years ago

I tried to implement the new iOS 7 layer drawing method conditionally in the latest release, but it doesn't seem to work. Did you have any luck with it?