Last Updated: February 25, 2016
·
320
· trustyfrog

Key-Value collection operators

The key-value collection operators are a really useful way to perform operations on collections of data.

NSNumber *amountSum = [transactions valueForKeyPath:@"@sum.amount"];

IMHO it beats iterating over a for-loop and maintaining the sum.

Key-Value Coding Programming Guide