I'm a kind new to Xcode/swift, I am trying to build a game where 5 pics need to selected randomly, So my code looks something like that: ()
var options = ["1.png","2.png","3.png","4.png","4.png"]
@IBAction func option1(sender: AnyObject) {
var randomNumber = Int(arc4random_uniform(5))
**iphoneChoise.image(options[randomNumber])** /*This line is not correct*/
} please help!
Aucun commentaire:
Enregistrer un commentaire