Swift iOS Playground:发送延期道具时出错 [英] Swift iOS playground: Error sending deferral props

查看:74
本文介绍了Swift iOS Playground:发送延期道具时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

像这样简单地设置iOS游乐场:

With an iOS playground set up as simply as this:

import UIKit
import SpriteKit
import XCPlayground

let s = CGSize(width: 300, height: 300)
let f = CGRect(origin: CGPointZero, size: s)
let view = SKView(frame: f)
let scene = SKScene(size: s)
scene.backgroundColor = SKColor.redColor()
view.presentScene(scene)
XCPShowView("main view", view)

我在控制台中得到了这个

I'm getting this in the console:

2014-09-04 17:02:13.358 SpriteKitBETA7[2009:20695] Error sending deferral props: 0x10000003

在助理编辑器"中有一个主视图"框,但未显示任何内容.这个完全相同的代码(用import Cocoa代替import UIKit)在OSX游乐场上可以完美地工作. 我知道我可以在OSX操场上测试东西(尽管在iOS上它会更方便,因为我不想使用Yosemite,但我确实有iOS7 SDK)并复制粘贴到我的项目中,但是我想知道是否有人知道这里发生了什么.

There IS a "main view" box in the Assistant Editor thing, but it doesn't display anything. This exact same code (with import Cocoa instead of import UIKit) works perfectly on an OSX playground. I am aware I can just test stuff in an OSX playground (though it would be more convenient on an iOS one since I don't want to use Yosemite but I do have the iOS7 SDK) and copy-paste to my project, but I wanted to know if anyone understood what's happening here.

推荐答案

每个

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 菜单栏中,转到查看> 实用工具> 显示文件检查器( + + 1 )
  2. 在右侧的文件检查器中的"游乐场设置"下,确保将平台设置为 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的视图.两者都适用于使用 SceneKit SpriteKit .

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.

这篇关于Swift iOS Playground:发送延期道具时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆