I think I\'m looking at some outdated code:
@IBAction func stockLevelDidChange(sender: AnyObject) { if var currentCell = sender as? UIView {
The problem is the if let newValue = textfield.text.toInt()? { .. If toInt() returns an Int? then just get rid of the ? there.
if let newValue = textfield.text.toInt()? {
toInt()
Int?
?