Swift 游乐场:替换 captureValue(_:withIdentifier:)

Swift Playgrounds: Replacement for captureValue(_:withIdentifier:)

Xcode 7.3 has deprecated XCPlaygroundPage.currentPage.captureValue(_:withIdentifier:). Its predecessor, XCPCaptureValue(), was deprecated 在 Xcode 7.1.

我想知道除了 collections 和循环中的隐式捕获之外是否有任何替代品?除了使用显式方法更加灵活之外,向图形添加标题的能力似乎随着 deprecation/removal 消失了(尽管找到了符号,但上述已弃用的方法没有做任何事情,或者至少没有做什么你会期望的)。

使用 currentPage 属性:

XCPlaygroundPage.currentPage.captureValue(_, withIdentifier:)

目前没有替代品或替代品。图表仅隐式显示。我已经在 WWDC 2016 的 Swift/Xcode 实验室中验证了这一点。我已经提交了一份雷达,如果有任何进展,我会更新这个问题。