I have a SpriteKit game where I want to blur only a part of the screen (the board where the game is played). But at the same time, I want to be able to interact with the other elements (like UIButtons) on the screen. So basically I'm looking for something like a form sheet, but one that blurs what is under it and allows interaction with the main view controller.
So here's my problem. I've tried to:
UIVisualEffectView
on my main view controller,UIVisualEffectView
in there, orUIVisualEffectView
in there.None of these options work for me.
Does anyone know what else I could try? Or am I not using something correctly?
答案 0 :(得分:1)
不幸的是,即使使用UIVisualEffectView
,SKView
也无法与SpriteKit很好地协作。我尝试了从A到zPositions的所有内容。
我决定在新的视图控制器中重新创建我的UIButton并以模态方式呈现OFS。通过这种方式,我可以访问美丽的UIVisualEffectView
模糊(SKEffectNode
模糊,并非在所有IMO中都很漂亮)和我的按钮。我希望Apple能够在未来版本的iOS和Swift中实现其框架的协同作用。再说一次,在应用程序开发方面,我并不是一个专家,所以如果还有其他任何我可以做的事情,我很乐意听到它: - )