I'm trying to make my programmatically appear somewhere random on the screen depending on the screen's size. I have already tried:
var random = Int(arc4random_uniform(UInt32(screenWidth)))
let newDrop:Drop = Drop(dropType: DropType.blue, xPos: random)
For some reason, the button ends up in the same place, near the edge of the screen:
Why is it appearing in the same position, and am I even doing it right. Is it even possible?
Thanks, Jack
Aucun commentaire:
Enregistrer un commentaire