I am trying to implement NSValue Transformer, which should help me save a double array to the underlying data using the Transformable attribute.
So, I tried to implement transformValueClass. But NSArray.class () is crossed out. Unfortunately, I did not find a reason for this. My method is as follows
class PacePerK:NSValueTransformer{
class func transformedValueClass() -> AnyClass!
{
return NSArray.class()
}
}
I get the following compiler errors: The expected name of the member following '.' Expected identifier in class declaration
Unfortunately, they really do not help me.
Why is NSArray.class crossed out? How can I return the NSArray class without causing a compiler error?
source
share