且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Swift iOS Playground:发送延迟道具时出错

更新时间:2022-03-13 22:55:20

根据 Xcode 6 Release Notes,你需要在File Inspector中启用Run in Full Simulator.请记住,由于它是通过 iOS 模拟器运行的,因此运行速度会很慢.在您的 XCPShowView 开始在 Playground 的时间轴中显示之前,您必须等待一段时间才能启动 iOS 模拟器.

Per the Xcode 6 Release Notes, you will want to enable Run in Full Simulator in the File Inspector. Keep in mind this will run kind of slow since it is running through iOS Simulator. You'll have to wait a while for the iOS Simulator to launch before your XCPShowView starts displaying in the playground's Timeline.

  1. Xcode 菜单栏中,转到 View > Utilities > Show File Inspector (++1)
  2. 在右侧的文件检查器中,在 Playground Settings 下,确保将 Platform 设置为 iOS
  3. 确保选中在完整模拟器中运行.
  1. In the Xcode menu bar, go to View > Utilities > Show File Inspector (++1)
  2. In the File Inspector on the right, under Playground Settings, make sure the Platform is set to iOS
  3. Make sure Run in Full Simulator is checked.

如果您将鼠标悬停在 在完整模拟器中运行 选项上,则说明您应该将其用于动画或使用 OpenGL 的视图.两者都适用于使用 SceneKitSpriteKit.

If you mouse over the Run in Full Simulator option it explains that you should use this with views that animate or use OpenGL. Both of which apply to using either SceneKit or SpriteKit.