0

在 Xcode 8 中,Apple 集成了一个注释文档生成器插件。选择您的方法或函数 (Swift) 和菜单 -> 编辑器 -> 结构 -> 添加文档。

斯威夫特的例子:

    /// Get the elevation of a point.
///
/// - Parameters:
///   - point: An array of one point @[lat, lon] or a dictionary @{"lat":..., "lon":...}.
///   - completionHandler: The completion handler to call when the load request is complete. 
///     This completion handler takes the following parameters:
///
///                              result: elevation in the same type as the input (point)
///                              error:  An error object that indicates why the request failed, or nil if the request was successful.

这是否被 CocoaPods 识别为 Swift 库?

4

0 回答 0