I'm trying to grasp the conversion thing in SpriteKit but despite having read the documentation and several posts on SO I can't seem to get it right. As far as I understand there are two coordinate systems that work independently of one another, one for the scene and one for the view, which is why I simply can't use the things like UIScreen.main.bounds.maxX to determine screen corners that the node can relate to. Am I getting this right?
Anyway, …
我已经dark mode在我的 iOS 应用程序中实现了,虽然它可以工作,但更改不会立即发生。我认为这与views没有像他们在android.
例如,退出应用程序,然后进行设置并更改主题,然后再次返回应用程序是行不通的。直到那时,与 Apple 相关的框架(如alertControllers. 为了dark mode上班,我必须点击一个新的view,然后再回到旧的view。
我曾尝试dark mode在委托中添加代码,因为我认为每次您重新进入应用程序时都会运行它,但事实并非如此。
那么,关于如何使这项工作有任何想法?例如,每次我重新进入应用程序时是否都会运行一个委托,或者我可以让观察者进行dark mode更改吗?