ios - swift convert Range<Int> to [Int] -
how convert range array
i tried:
let min = 50 let max = 100 let intarray:[int] = (min...max) get error range<int> not convertible [int]
i tried:
let intarray:[int] = [min...max] and
let intarray:[int] = (min...max) [int] they don't work either.
you need create array<int> using range<int> rather cast it.
let intarray: [int] = array(min...max)
Comments
Post a Comment