Reputation: 65
I dont know why I'm getting this error? I am using Xcode 6 beta 5
func random() ->UInt32 {
var range = UInt32(50)..UInt32(200)
return range.startIndex + arc4random_uniform(range.endIndex - range.startIndex + 1)
I get the error - use of unresolved identifier '..'
Please help, thank you
Upvotes: 1
Views: 1333
Reputation: 49034
In beta 3, the half-closed range operator was changed from ..
to ..<
. So your second line should be this instead:
var range = UInt32(50)..<UInt32(200)
Upvotes: 5