当我按下按钮时,NSInvalidArgumentException

按下按钮时出现此错误

***由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'-[CRMClient.StatusViewController finishButton:]:无法识别的选择器发送到实例0x7ff3995d44e0'
    @IBAction func statusB(_ sender: Any) {
            if statusField.text != ""{
                let typeOfStatus = statusField.text!
                var numStatus = 0
                switch typeOfStatus {
                case "Новая":
                    numStatus = 1
                case "Завершена":
                    numStatus = 6
                default: ()
                }
            let statusOrder = OrderStatus(orderStatus: numStatus)
                ServerManager.shared.putStatusOrder(token: UserDefaults.standard.value(forKey: "token") as! String, id: UserDefaults.standard.value(forKey: "id") as! Int, statusOrder: statusOrder, { (successMessage) in
                    print(successMessage)

                    //createAlert(title: "Поздравялем", message: "Вы добавили заявку!")
                }) { (error) in
                    //createAlertError(title: "Ошибка", message: "Ваша заявка не добавлена!")
                   print(error)
                }
        }
    }
评论