Im using arc4random to generate a random number which im then using to display an image asset but i need a button that will stop arc4random generating that number again once its pressed
@IBAction func Button(_ sender: Any) {
let BugRandom = arc4random_uniform(18)
Smallbug.image = UIImage(named: "Bug\(BugRandom)")
}
Does anyone know if this is possible or what i should be looking for?
Aucun commentaire:
Enregistrer un commentaire