Cocoa with love

Cocoa & objective-C - though somewhat strange to us, earthlings grown up on Visual Studio with C# and Eclipse with Java - has some quite interesting and useful and interesting features to be used.

As I just exploring this whole new galaxy, it shall not be a shame to present some of these "stone samples" just found...

[customers valueForKeyPath:@"@avg.emailAddress.length"];

... more on Cocoa key paths here.

NSPredicate *bPredicate =
[NSPredicate predicateWithFormat:@"SELF beginswith[c] 'b'"];
NSArray *beginWithB =
[array filteredArrayUsingPredicate:bPredicate];

...more on predicates here.

No comments:

Post a Comment