【发布时间】:2025-12-27 13:15:17
【问题描述】:
在 Swift 3 中,我收到以下错误(在 Swift 2 中没有发生):
没有 * 候选人产生预期的结果类型 FloatingPointRoundingRule
我不知道我需要做什么来修复它。
我正在尝试将纬度小数转换为度/分/秒
extension CLLocationDegrees {
mutating func toLatitudeSeconds() -> String {
var seconds = Int(round(self * 3600)) //error here
// etc ...
}
}
【问题讨论】: