Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // ViewController.swift
- // CiaoXXX
- //
- // Created by Alexandro sollai on 24/10/14.
- // Copyright (c) 2014 Alexandro sollai. All rights reserved.
- //
- import UIKit
- class ViewController: UIViewController {
- @IBOutlet var txtTesto1: UITextField!
- @IBOutlet var cmdPulsante1: UIButton!
- @IBOutlet var lblLabel1: UILabel!
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view, typically from a nib.
- configuracontrolli()
- }
- override func didReceiveMemoryWarning() {
- super.didReceiveMemoryWarning()
- // Dispose of any resources that can be recreated.
- }
- @IBAction func Saluta(sender: AnyObject){
- lblLabel1.text="Ciao,\(txtTesto1.text)!"
- }
- func configuracontrolli(){
- txtTesto1.placeholder = "Inserisci il tuo nome!"
- cmdPulsante1.setTitle("Saluta", forState:
- UIControlState.Normal)
- lblLabel1.textAlignment=NSTextAlignment.Center
- lblLabel1.textColor=UIColor.blueColor()
- lblLabel1.text=""
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement