BWSnippet

Swift Random Number

Swift Random Number

Generate random number in swift

 

Say you want a random number in swift between 0 and 10 .... 

let random_num = arc4random_uniform(  10   )

Tags

Swift Random Number