----- CAPITULO 6 -------


Ejemplo numero 3

Codigo de Ejercicio:

  • Primera aplicacion para ios
  • 
    //
    //  ViewController.swift
    //  MyPrimerIOS
    
    // Jehovani de Jesus Chavez Segovia 2561842011
    
    // uso de boton y label
    
    import UIKit
    
    //Declaramos la clase
    class ViewController: UIViewController {
        @IBOutlet weak var nameLabel: UILabel!
        
        //Escribimos lo que queremos mostrar
        @IBAction func showName(AnyObject) {
            nameLabel.text = "Mi Nombre es Jehovani!"
        }
        
        
    
        override func viewDidLoad() {
            super.viewDidLoad()
            // Do any additional setup after loading the view, typically from a nib.
        }
    
        override func didReceiveMemoryWarning() {
            super.didReceiveMemoryWarning()
            // Dispose of any resources that can be recreated.
        }
    
    
    }
    
    
                                

Cuando ya le damos click al boton