找到你要的答案

Q:Why is my second SKView not being updated?

Q:为什么是我的第二skview不更新?

I placed two SKViews in my storyboard and hooked them up via outlets. They are both rendering the correct content, and updating their FPS displays. I can change their cameras position and again both are rendering correctly.

But the update(currentTime: CFTimeInterval) method of their SKScene is only being called in the first SKView. If I remove the outlet of the first SKView then the second SKView starts getting its update method called.

Is it not allowed to have more than one SKView in a UIViewController at the same time? Or is there something else I am doing wrong?

我在我的故事放在两skviews和通过网点连接起来。他们都是绘制正确的内容,并更新他们的FPS显示。我可以改变他们的相机位置,再次渲染正确。

但更新(时间:cftimeinterval)他们的skscene方法只在第一skview叫。如果我将出口的第一skview第二skview开始更新方法。

它是不允许同时在一个窗口有一个以上的skview?或者我做错了什么?

answer1: 回答1:

The update method is part of SKScene and you can only have one active SKScene at any one time.

更新的方法是SKScene的一部分,你只可以在任何一个时间有一个活跃的SKScene。

ios  cocoa-touch  sprite-kit