crear un número random
ViewController.swift // PrimeraAppCF // Created by Luis Enrique Hernandez Celaya on 04/06/17. //Copyright • 2017 CódigoFacilito. All rights reserved. import UIKit class ViewController: UIViewController { @IBOutlet weak var numbertxt: UITextField! @IBOutlet weak var intentoslbl: UILabel! @IBOutlet weak var mensajelbl: UILabel! var random = " @IBAction func validar( sender: Any) { setValues ( ) } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. func setValues random = String (arc4random_uniform (10)) print (random) } }