Generar numero random

 


import UIKit  
class ViewController: UIViewController {  

    @IBOutlet weak var numeroTxt: UITextField!  
    @IBOutlet weak var minimoLbl: UILabel!  
    @IBOutlet weak var mensajeLbl: UILabel!  

    @IBAction func validar(_ sender: UIButton) {  
        // set values (0, 4)  
        let random = String(arc4random_uniform(6))  
        print("random:







Comentarios

Entradas populares de este blog

Necesidades y problemas del mercado

Investigación del codigo