iOS: Hello World with a text field

This entry is part 2 of 32 in the series iOS Apps

Hello World created with Swift with a text entering field.

I tested it with my latest version of xCode and this is what I have in ViewController.swift.

import UIKit

class ViewController: UIViewController {

    @IBOutlet var nameLabel: UILabel!
    override func viewDidLoad() {
        // Do any additional setup after loading the view, typically from a nib.

    override func didReceiveMemoryWarning() {
        // Dispose of any resources that can be recreated.

    @IBAction func helloWorldAction(nameTextField: UITextField) {
        nameLabel.text = "Hi \(nameTextField.text!)"



Series Navigation<< iOS Apps: Logistics, iOS 8 Overview
iOS: First App from Apple >>

Leave a comment

Leave a Reply