Sunday, May 29, 2016

Get a Random Number

 
print(arc4random()) // Random number up to 4,294,967,296
print(arc4random_uniform(10)) // Random number from 0 to 9
print(drand48()) // Random double between 0.0 and 1.0. Example: 0.396464773760275
 

(Swift 2.2)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

SwiftUI Search & Filter with Combine - Part 3 (iOS, Xcode 13, SwiftUI, 2...

In part 3 of the Searchable video series, I show you how to use Combine in #SwiftUI for the search and filter logic connected to the searcha...