Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图向我的 SKScene 添加一个平移手势识别器,但事实证明我的场景中的视图为零。我使用的是 SwiftUI,所以当我呈现这个场景时,我使用的是 SpriteView。看起来 SpriteView 没有添加为我的场景的父视图。我也不能稍后将它添加为视图,因为视图属性是只读成员。如何将手势识别器添加到没有父视图的场景?
这就是我在视图上渲染场景的方式