My First iOS App

MyFirst iOS App Hello World

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() {


// Do any additional setup after loading the view, typically from a nib.


override func didReceiveMemoryWarning() {


// Dispose of any resources that can be recreated.