gpt4 book ai didi

swift - 如何在 Xcode (Swift) 中添加自动完成注释?

转载 作者:搜寻专家 更新时间:2023-10-31 19:33:20 27 4
gpt4 key购买 nike

如何将文本添加到自动完成中,如下所示,“告诉元素激活自身...”部分,

enter image description here

这是我的,

enter image description here

但是“这是一个测试”部分并没有出现在自动完成中,

enter image description here

请不要链接到其他介绍如何撰写评论的帖子,以便它们显示在使用 Option+Click 弹出的窗口中,我很清楚如何做到这一点。我的问题专门针对自动完成窗口中显示的评论。

最佳答案

试试这个,在 Xcode 9.3 - 9.4 beta 和 swift 4.1 上测试

/// this is printName func and will print your name
func printName(name: String){
print("my name is \(name)")
}

和结果: enter image description here

关于swift - 如何在 Xcode (Swift) 中添加自动完成注释?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40517798/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com