Swift Playgrounds:captureValue的替换(_:withIdentifier :)

时间:2023-01-23 18:02:04

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

Xcode 7.3已弃用XCPlaygroundPage.currentPage.captureValue(_:withIdentifier :)。它的前身XCPCaptureValue()在Xcode 7.1中已被弃用。

I'm wondering if there is any replacement, apart from implicit capture of collections and in loops? Apart from being more flexible using the explicit approach, the ability to add captions to graphs seems to be gone with the deprecation/removal (although the symbols are found, the aforementioned deprecated methods don't do anything, or at least not what you'd expect).

我想知道是否有任何替换,除了隐式捕获集合和循环?除了使用显式方法更灵活之外,向图表添加字幕的功能似乎随着弃用/删除而消失(尽管找到符号,上述弃用的方法不做任何事情,或者至少不是你的' d期待)。

2 个解决方案

#1


2  

There is currently no alternative or replacement. Graphs are only displayed implicitly. I have verified this in the Swift/Xcode labs at WWDC 2016. I have filed a radar and will update this questions, should there be any progress.

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

#2


-2  

Use the currentPage property:

使用currentPage属性:

XCPlaygroundPage.currentPage.captureValue(_, withIdentifier:)

XCPlaygroundPage.currentPage.captureValue(_,withIdentifier :)

#1


2  

There is currently no alternative or replacement. Graphs are only displayed implicitly. I have verified this in the Swift/Xcode labs at WWDC 2016. I have filed a radar and will update this questions, should there be any progress.

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

#2


-2  

Use the currentPage property:

使用currentPage属性:

XCPlaygroundPage.currentPage.captureValue(_, withIdentifier:)

XCPlaygroundPage.currentPage.captureValue(_,withIdentifier :)