swift ? must be followed by a call, member lookup, or subscript

后端 未结 3 747
臣服心动
臣服心动 2021-01-07 23:41

I think I\'m looking at some outdated code:

@IBAction func stockLevelDidChange(sender: AnyObject) {
        if var currentCell = sender as? UIView {
                 


        
3条回答
  •  盖世英雄少女心
    2021-01-08 00:35

    In 1.2, toInt is gone. So,

    if let newValue = textfield.text.toInt()?
    

    Should be replaced with:

    if let newValue:Int? = Int(textField.text!)
    

提交回复
热议问题