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.
In 1.2, toInt
is gone. So,
if let newValue = textfield.text.toInt()?
Should be replaced with:
if let newValue:Int? = Int(textField.text!)
Actually the as?
are all fine. The problem is this line:
if let id = cell.productId?
Just remove the question mark at the end of that. It makes no sense.