Write import Darwin
and use arc4random()
instead of random()
… This will resolve your error
More Related Contents:
- Swift – Create charts(bar, line, pie, column) programatically [closed]
- Converting String to Int with Swift
- iOS 8 UITableView separator inset 0 not working
- Importing CommonCrypto in a Swift framework
- Customize UITableView header section
- Subclass UIApplication with Swift
- SwiftUI | Using onDrag and onDrop to reorder Items within one single LazyGrid?
- How to make an HTTP request + basic auth in Swift
- Issue using CCCrypt (CommonCrypt) in Swift
- Converting Hex String to NSData in Swift
- Exhaustive condition of switch case in Swift
- How to check if a view controller is presented modally or pushed on a navigation stack?
- ++ is deprecated it will be removed in swift 3 [closed]
- iOS 11 disable password autofill accessory view option?
- how to pass multiple values with a notification in swift
- How to convert a double into a byte array in swift?
- Default keyword in Swift parameter
- Swift countElements() return incorrect value when count flag emoji
- Find the tangent of a point on a cubic bezier curve
- Waiting for multiple asynchronous download tasks
- Add custom controls to AVPlayer in swift
- SwiftUI Landmarks App Tutorial Screen Navigates Back When Toggle Favorite
- iOS temporary folder location
- Loading ViewController from xib file
- Set UITableView’s height to the height of its content with Auto Layout
- Accessing variables from another ViewController in Swift
- How to filter Firebase data in Swift?
- Duplicate Symbol Error in NSManagedObject Subclass
- Ambiguous use of subscript xcode 7.1
- SwiftUI: Error in dragging logic or is this a bug?