摘要: 按NSDictionary的key来对其进行排序:先将dict的allkeys赋给一个数组,然后通过sortedArrayUsingComparator:方法对数组排序,然后遍历数组取字典对应key的值就okinti =0;NSArray*keys = [dictallKeys];NSArray*s... 阅读全文
posted @ 2015-05-09 19:18 5436 阅读(1721) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2015-05-06 18:30 5436 阅读(42) 评论(0) 推荐(0) 编辑
摘要: [cpp]view plaincopyprint?NSArray*arr=[[NSArrayalloc]initWithObjects:@"aa",@"bb",@"cc",@"dd",@"ee",@"ff",nil];//1.对数组进行升序排序//sortedArrayUsingSelector:排... 阅读全文
posted @ 2015-05-04 18:31 5436 阅读(379) 评论(0) 推荐(0) 编辑
摘要: [cpp]view plaincopyprint?NSMutableArray*arr=[[NSMutableArrayalloc]init];for(inti=0;i 阅读全文
posted @ 2015-05-04 18:29 5436 阅读(183) 评论(0) 推荐(0) 编辑
摘要: -(NSArray*)invertedOrder{//1.先拷贝副本NSMutableArray*arr=[NSMutableArrayarrayWithArray:self];for(inti=0;iNSArray*arr=@[@"aa",@"bb",@"cc",@"dd",@"ee"];//0-... 阅读全文
posted @ 2015-05-04 18:28 5436 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #import"Teacher.h"@interfaceOurClass:NSObject@property(nonatomic,retain)Teacher*tea;@property(nonatomic,retain)NSMutableArray*arr;@end#import"OurClass... 阅读全文
posted @ 2015-05-04 18:26 5436 阅读(703) 评论(0) 推荐(0) 编辑
摘要: #importintmain(intargc,constchar*argv[]){@autoreleasepool{//创建字典NSDictionary*dic1=[NSDictionarydictionaryWithObject:@"value"forKey:@"key"];NSLog(@"dic... 阅读全文
posted @ 2015-05-04 09:09 5436 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 这个对于名字的比较有局限看看下面的比较mv也可以用这种办法 阅读全文
posted @ 2015-05-02 16:59 5436 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-05-02 11:15 5436 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-05-02 11:13 5436 阅读(150) 评论(0) 推荐(0) 编辑