Trying to pull a number from a Field and keep getting Optional(number) instead of the number
@IBOutlet weak var years: UITextField! @IBAction func calculateYear
That happens because the toInt() method returns an optional, to account for the case when the string is not convertible to an integer.
toInt()
Just put that in an optional binding:
if let a = a { println(a) }