我正在尝试在xcode版本7.3.1中为操场使用时间轴助手编辑器,它始终为空。
Timeline assistant editor

我认为错误来自xcode,但是从搜索看来,似乎没有人遇到相同的错误,因此我感到困惑。

最佳答案

要显示print的结果,您需要通过转到菜单来打开“调试区域”


  查看>调试区域>显示调试区域


或单击左下方的按钮:

xcode - Xcode Playground时间轴为空-LMLPHP

xcode - Xcode Playground时间轴为空-LMLPHP

要显示时间线图,可以使用XCPCaptureValue

import XCPlayground

var x = 0
for i in 0...10 {
    x += i
    print(x)
    XCPCaptureValue("Value for x", value: x)
}


xcode - Xcode Playground时间轴为空-LMLPHP

但是XCPCaptureValue已被弃用,以后将不再可用(没有available replacement)。

另一种方法是通过单击右侧的“ +”按钮来内联显示图形:

xcode - Xcode Playground时间轴为空-LMLPHP

在图形上单击鼠标右键,您可以选择显示值历史记录:

xcode - Xcode Playground时间轴为空-LMLPHP

关于xcode - Xcode Playground时间轴为空,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40041540/

10-09 22:39
查看更多