在Swift3中我收到以下错误(这在Swift2中没有发生):No*candidatesproducetheexpectedresulttypeFloatingPointRoundingRule我不知道我需要做什么来修复它。我正在尝试将纬度小数转换为度/分/秒extensionCLLocationDegrees{mutatingfunctoLatitudeSeconds()->String{varseconds=Int(round(self*3600))//errorhere//etc...}} 最佳答案 舍入函数被更改为在实例上调