Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

 3 Answer(s)

  • You can use arc4random() function or arc4random_uniform() function to generate random number usign Swift 3.0.

    For eg:
    To generate a random number between  1 to 200 use the function as below 
    let number = 1 + arc4random_uniform(200)
    or 
    let number = 1 + ( arc4random() % 200 )
  • For Random Number use this " arc4random() " function or " arc4random_uniform()" function to generate random number using Swift 3.0


    For eg:
    To generate a random number between  0 to Range(Like: 10,100,1000) use the function as below 
    let number = 1 + arc4random_uniform(Range)
  • You can use arc4random() function or arc4random_uniform() function to generate random number usign Swift 3.0.

    For eg:
    To generate a random number between  1 to 200 use the function as below 
    let number = 1 + arc4random_uniform(200)
    or 
    let number = 1 + ( arc4random() % 200 )
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: