FXBlurView icon indicating copy to clipboard operation
FXBlurView copied to clipboard

Doesn't seem to work with SpriteKit

Open CocoaPriest opened this issue 10 years ago • 6 comments

can't post example due to NDA...

CocoaPriest avatar Aug 27 '13 18:08 CocoaPriest

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).

nicklockwood avatar Aug 27 '13 19:08 nicklockwood

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

CocoaPriest avatar Aug 27 '13 19:08 CocoaPriest

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

nicklockwood avatar Aug 27 '13 22:08 nicklockwood

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.

nicklockwood avatar Aug 27 '13 22:08 nicklockwood

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

CocoaPriest avatar Aug 27 '13 22:08 CocoaPriest

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?

nicklockwood avatar Aug 30 '13 23:08 nicklockwood