Optional

import UIKit
var x: Int
x = nil

var c: UIColor
c = UIColor.redColor()
c = nil

The method, .toInt(), is deprecated in the String struct. We now use the initializer method, Int(_: String), from the Int struct.

var y: Int
var s1: String
var s2: String

s1 = "123"
s2 = "ABC"

y = Int(s1)
y = Int(s2)

class ViewController: UIViewController {
	var button: UIButton
}