我想在Swift中的同一个文件中创建一个链接引用,就像你在JavaDoc中那样,但我似乎无法找到描述如何执行此操作的文档.您只能引用外部URL.我希望能够做到这样的事情:
class myClass : UIView {
/// The label that displays the scale of this view
/// - seealso: [showScaleView](showScaleView())
private lazy var scaleView: UIView = UIView()
/// Shows the scale view
/// - seealso: [scaleView](scaleView)
private func showScaleView() {
...
}
}
Run Code Online (Sandbox Code Playgroud) 假设我有两个类:
/**
This class should be used together with [Foo]( ??? ).
*/
class Bar {
func doNothing() {}
}
/**
Description of what Foo does goes here.
*/
class Foo {
func doNothing() {}
}
Run Code Online (Sandbox Code Playgroud)
我想在Bar的Xcode快速帮助中创建一个指向Foo或Foo快速帮助的链接.它甚至可能吗?如果是这样,怎么样?
由于我是 Objective-C 的粉丝,#pragma MARK:但最近我/// -Tag:在 Apple 的源代码中看到了。同样值得注意的是,它以白色突出显示,而MARK不是。Tag另一方面,不会向 Xcode 的“大纲”视图添加任何文本。
谁能解释一下目的Tag是什么?