我需要这个表达式 --> sum:(abs:(amount) * -1)
我的代码是:
let absExpression = NSExpression(forFunction: "abs:", arguments: [NSExpression(forKeyPath: Table.COLUMN_AMOUNT)])
let minusAbsExpression = NSExpression(format: "%@ * -1", argumentArray: [absExpression])
let trueExpression = NSExpression(forFunction: "sum:", arguments: [minusAbsExpression])
但崩溃的原因是:
reason: 'Unsupported function expression sum:(abs:(amount) * -1)'