【发布时间】:2021-12-03 21:20:36
【问题描述】:
使用 Xcode 13,在通用 Swift print() 函数上方的 Xcode 代码完成列表中,键入 print 的任何子字符串都会建议 printContent() 首先。
printContent(_ sender: Any?)
告诉您的应用打印可用内容。
“跳转到定义”显示以下声明,2021 年 iOS 15 新增:
public protocol UIResponderStandardEditActions : NSObjectProtocol {
// ...
@available(iOS 15.0, *)
optional func printContent(_ sender: Any?)
}
printContent() 函数是什么,它是如何使用的?
它是否是 print() 的新更好替代品,证明其在 Xcode 中突出的代码完成位置是合理的?
如果没有,我该如何回到 Xcode 13 之前的行为并在列表中首先建议极其常见的 print() 函数?
【问题讨论】:
-
如何回到 Xcode 13 之前的行为并在列表中首先建议极其常见的 print() 函数?每次都看到打印内容很烦人
标签: xcode nsobject code-completion uiresponder