请帮助如何在swift3中解决此错误
let max:Int = Int(StackMaxWidth/10)
let min:Int = Int(StackMinWidth/10)
let width:CGFlot = CGFlot(randomInRange(min...max)*10)
func randomInRange(_ range: Range<Int>) -> Int {
let count = UInt32(range.upperBound - range.lowerBound)
return Int(arc4random_uniform(count)) + range.lowerBound
} 这是一种功能
答案 0 :(得分:0)
将self.StackGapMinWidth...maxGap
替换为self.StackGapMinWidth..<(maxGap + 1)