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

后端 未结 3 708
臣服心动
臣服心动 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:41

    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.

提交回复
热议问题