首页 » Posts tagged 'NSArray'

标签:NSArray

ios开发 常用功能 总结

低调的术木 | iOS 开发 | 2014-07-27
NSArray 示例: //Create an array NSMutableArray *anArray = [@[@"Clark Kent", @"Lois Lane"] mutableCopy]; //Add new items [anArray addObject:@"Lex Luthor"]; //Find array length NSLog(@"Array has %d items", [anArray count]); //Iterate over array items for (NSStri... [阅读全文]

NSArray的排序方法

低调的术木 | iOS 开发 | 2013-03-25
1.sortedArrayUsingSelector (按Key值大小对NSDictionary排序) NSMutableArray *array = [NSMutableArray arrayWithObjects: [NSDictionary dictionaryWithObjectsAndKeys:@"Obj0", [NSNumber numberWithInt:0], nil], [NSDictionary dictionaryWithObjectsAndKeys:@"... [阅读全文]
Ɣ回顶部