2. English
Grab, Drag
(grab a object, grap a UI component.)
Hook up with, wire up, attach
(hook up a controller with a code.)
Guy
(this one.)
Make it …
(make it bigger, make it red, make it 8)
7. UIViewController
// Your view has to extend UIViewController.
class ViewController: UIViewController
// UIViewController has a reference to the super view.
view: UIView!
// Your view has to override viewDidLoad to work with the view.
// Initialize the view.
override func viewDidLoad()
8. Demo
Place a button with StoryBoard
change the button title in VC.
Implement an event handler with SB.
change the button title in the handler.
Do the above without using SB.
In VC, create a button, register the handler.
9. View
// create an instance of Button.
let btn = UIButton()
// set size of the button.
btn.frame = CGRectMake(0, 0, 300, 50)
// set the title of the button.
btn.setTitle("Click me!", forState: UIControlState.Normal)
// add it to the parent view.
self.view.addSubview(btn)