-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
I am using RestKit in my swift project and I need value transformers for a particular use case. I was trying to write this in swift as below just as a simple upper case transformer.
func transformValue(_ inputValue: Any?, toValue outputValue: Any?, of outputValueClass: AnyClass) throws -> Bool {
var outputValue = outputValue
if outputValueClass is String.Type {
outputValue = (inputValue as? String)?.uppercased()
}
return true
}
When I do this, I get this error RKValueTransformer subclasses must provide a concrete implementation of 'transformValue:toValue:ofClass:error:'
How do I write these lines in swift?
RKValueTransformerTestInputValueIsKindOfClass(inputValue, (@[ [NSDictionary class], [CLLocation class] ]), error);
RKValueTransformerTestOutputValueClassIsSubclassOfClass(outputValueClass, (@[ [NSDictionary class], [CLLocation class] ]), error);
Metadata
Metadata
Assignees
Labels
No labels