从 doxygen 风格的 Objective-C 注释链接到外部 URL 文档

gkl*_*lka 6 documentation xcode doxygen ios

我想写一些类似的东西:

/**
 Post a review. (For every place belongs only one review. If it was already written, the previous one will be overwritten.)

 @param placeId Place identifier
 @param rating Rating 0-5 for the place
 @param review The text the user entered for review
 @param callback Gets called either when the network request succeeds or when fails for some reason. The `success` parameter indicates this. If success is true, the contents of the `data` parameter of the response is given back as the `response` parameter. If the request fails, then only the `error` parameter is filled. You can find the details in this object.

 @see http://example.com/api/v1/doc/service/review/saveReview?pkey=t75jg-5uGse-qIo
 */
- (void)saveReviewFor:(NSNumber *)placeId rating:(NSUInteger)rating review:(NSString *)review callback:(VMNetworkCallback)callback;
Run Code Online (Sandbox Code Playgroud)

问题是,@see标签上的链接在 Xcode 帮助气泡中不可点击:

Xcode 截图

在这个视图中是否可以有一个可点击的文档链接?我应该使用什么语法?

Yog*_*ann 1

是的,可以这样做,将您的@see标签更改为如下:

@see <http://example.com/api/v1/doc/service/review/saveReview?pkey=t75jg-5uGse-qIo>
Run Code Online (Sandbox Code Playgroud)

有关更多信息,您可以阅读 Doxygen 文档Markdown 支持 -> 自动链接的相关部分