Tutorial by Examples

NSArray *array1 = [NSArray arrayWithObjects:@"one", @"two", @"three", nil]; NSArray *array2 = @[@"one", @"two", @"three"];
The most flexible ways to sort an array is with the sortedArrayUsingComparator: method. This accepts an ^NSComparisonResult(id obj1, id obj2) block. Return Value Description NSOrderedAscending obj1 comes before obj2 NSOrderedSame obj1 and obj2 have no order NSOrdere...
NSMutableArray *array = [NSMutableArray arrayWithObjects:@"Ken", @"Tim", @"Chris", @"Steve",@"Charlie",@"Melissa", nil]; NSPredicate *bPredicate = [NSPredicate predicateWithFormat:@"SELF beginswith[c] 'c'"]; NSArray ...

Page 1 of 1