Skip to content

Instantly share code, notes, and snippets.

@sheminusminus
Created March 4, 2017 02:55
Show Gist options
  • Save sheminusminus/dcc75b7b1b79430e41763b62d86dc1c5 to your computer and use it in GitHub Desktop.
Save sheminusminus/dcc75b7b1b79430e41763b62d86dc1c5 to your computer and use it in GitHub Desktop.
introductory view controller class
//
// ViewController.swift
// Norberto
//
// Created by Emily Kolar on 3/3/17.
// Copyright © 2017 emilykolar. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var addNoteButton: UIButton!
// MARK: properties
var username: String!
var userAge: Int!
// MARK: lifecycle methods
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor.black
let coolButton: UIButton = UIButton(frame: CGRect(x: 10, y: 10, width: 100, height: 60))
coolButton.backgroundColor = UIColor.cyan
coolButton.setTitle("hola", for: .normal)
self.view.addSubview(coolButton)
addNoteButton.backgroundColor = UIColor.lightGray
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// var prettyBlue: UIColor = UIColor.cyan
//
// switch(userAge) {
// case 10:
// print("kid!")
// default:
// print("you old")
// }
// for thing in myThings {
// print("do stuff")
// }
// for i in 0..<10 {
//
// }
// repeat {
// print("do stuff")
// } while (userAge < 20)
// do {
// print("do stuff")
// // var audioPlayer = try! AudioPlayer(initWithFile: filename)
// }
// catch let error {
// print(error)
// }
}
// func returnAString() -> String {
// return "NECESSARY"
// }
//
// func calculateSum(_ num: Int, _ num2: Int) -> Int {
// return num + num2
// }
// MARK: class methods
// MARK: actions
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment