摘要: #importintmain(intargc,constcharchar*argv[]){@autoreleasepool{//原始数组NSMutableArray*originalarray=[NSMutableArrayarrayWithArray:@[@1,@3,@5,@7,@9]];inti... 阅读全文
posted @ 2016-01-13 16:35 专注博客园三十年 阅读(430) 评论(0) 推荐(0) 编辑
摘要: NSLog(@"第四题"); NSComparator comp=^(id obj1 ,id obj2){ int age1=[ obj1[@"age"]intValue ]; int age2=[obj2[@"age"]intValue]; if(age1==a... 阅读全文
posted @ 2016-01-11 17:04 专注博客园三十年 阅读(386) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { NSArray *arr3=@[@{@"name":@"Tim Cook",@"age":@"24",@"sex":@"female",@"s... 阅读全文
posted @ 2016-01-11 16:34 专注博客园三十年 阅读(176) 评论(0) 推荐(0) 编辑
摘要: int main(int argc, const char * argv[]) { @autoreleasepool { NSDate* date = [NSDate date]; NSLog(@"%@",date); NSLog(@"%@",[date descripti... 阅读全文
posted @ 2016-01-11 13:54 专注博客园三十年 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-01-11 13:05 专注博客园三十年 阅读(163) 评论(0) 推荐(0) 编辑
摘要: int main(int argc, const char * argv[]) { @autoreleasepool { NSLog(@"第1题——————————————————————————————————————————————————————————————————————————... 阅读全文
posted @ 2016-01-11 12:57 专注博客园三十年 阅读(248) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //1.对字符串“2015-09-01 08:19:10”操作,输出"08:19:10"。要求使用两种截取方式。 NSStrin... 阅读全文
posted @ 2016-01-11 10:24 专注博客园三十年 阅读(323) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { //将字典的key从Z->A排序,按排序后的key的顺序,输出value,将value按字符串输出 NSDictionary *... 阅读全文
posted @ 2016-01-11 10:11 专注博客园三十年 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #import static NSString * const kName = @"name";static NSString * const kAge = @"age";static NSString * const kGender = @"gender";inline static NSMuta... 阅读全文
posted @ 2016-01-11 10:09 专注博客园三十年 阅读(212) 评论(0) 推荐(0) 编辑
摘要: #import int main(int argc, const char * argv[]) { @autoreleasepool { /* 简述:Cocoa框架中的NSPredicate用于查询,原理和用法都类似于SQL中的where,作用相当于数据库的过滤取... 阅读全文
posted @ 2016-01-11 09:06 专注博客园三十年 阅读(586) 评论(0) 推荐(0) 编辑