ahmed ahmed - 13 days ago 9x
Swift Question

Swift String Error

I get a "Enum element checked cannot be referenced as an instance member error". Please help

}else if self.ByOwner.checkState = .Checked{

self.performSegue(withIdentifier: "ToProductOwnersNameViewController#2", sender: nil)

Error image


As @MartinR mentioned, == is a comparison operator and single = (equal to) is assignment operator so if in any conditional statement you should state the statement like

if(self.ByOwner.checkState == Checked)


//work to be done