我试图通过参数将一个Int常量传递给我的for循环的步幅。它采用T.stride类型。
let notchStep:Int = 5
for degrees:Double in stride(from: 0, to: 359, by: notchStep) {我得到了这个错误:
无法使用类型为'(from: Int,to: Int,by: Int)‘的参数列表调用'stride’。我可以传递什么类型的值,或者我如何将Int转换为合适的类型?
https://stackoverflow.com/questions/44448858
复制相似问题