MyFirst iOS App Hello World
https://s3.amazonaws.com/swiftbook/hello-world-swift.pdf
HelloWorld -label & button & UIAlertController & autolayout
//
// ViewController.swift
// HelloWorld
// Copyright © 2015 Park. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var label1: UILabel!
@IBAction func showMessage(sender: AnyObject) {
label1.text = “Welcome to Swift”
let alertController = UIAlertController(title: “Welcome to my first iOS App”, message: “Hello World”, preferredStyle: UIAlertControllerStyle.Alert)
alertController.addAction(UIAlertAction(title: “OK”, style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alertController, animated: true, completion: nil)
}
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.
}
}