Posts

Post not yet marked as solved
1 Replies
594 Views
import UIKitclass ViewController: UIViewController { var randomDiceIndex1 : Int = 0 var randomDiceIndex2 : Int = 0 @IBOutlet weak var diceImageView1: UIImageView! @IBOutlet weak var diceimageView2: UIImageView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func rollButtonPressed(_ sender: UIButton) { randomDiceIndex1 = Int.random(in:0...6) randomDiceIndex2 = Int.random(in:0...6 ) } }
Posted
by rviewer1.
Last updated
.