I have a CIFilter I want to do some effects to. I have an enum of type String
enum FilterType:String{
case Sepiatone = "CISepiatone"
case FalseColor = "CIFalseColor"
}
But if I try the below code, the enum is NOT being treated as a string
private class func createFilter(inout filter:CIFilter!,filterName:FilterType)
{
switch filterName{
case .Sepiatone:
filter = CIFilter(name: filterName) //ERROR "Extra argument 'name' in call
default:
println("Filter name is not a match")
}
}
The error message means its not seeing my enum type as a string and as such thinks I'm using the wrong init.
Do you know what is wrong with my switch statement?