How to I cast a type to a variable in an enum within a switch statement? – Ios swift
switch error { case Project.Client.LoadError.operationFailed(let error2): switch error2 { case Project.Client.APIClientError.invalidStatusCode(let message, _): guard message != nil, message == "error" else { return refresh() } delegate?.error(invalidScript) default: refresh() } default: refresh() } Here is my current code. This works but…