摘要:
#pragma mark dateCreate void dateCreate(){ NSDate *date=[NSDate date];//调用当前时间 now //返回以当前时间为基准,然后过了secs秒时间。 date=[NSDate dateWithTimeIntervalSinceNow:10];//TimeInterval 是秒 //会比当前时间快10s //基准... 阅读全文
摘要:
针对结构体 NSNumber->数字 NSNumber是NSValue的一个子类 NSValue可以包装任意值(也可以包装对象,吃太多 ) void value(){ CGPoint point=CGPointMake(10,10); NSValue *value=[NSValue valueWithPoint:point]; NSMutableArray array=[NSMuta... 阅读全文
摘要:
集合中是不能放nil值的,因为nil是结尾,但是为了存放表示什么都没有的值,可以使用NSNull,它也是NSObject的一个子类. void null(){ NSNull *nl=[NSNull null]; //全局单粒,只能有一个,返回的是同一个单粒对象 //{“id”:10,“name”:”mj”,”descs”:”null”} //解析成dictionary所以干脆没有最后的k... 阅读全文
摘要:
NSNumber 可以将基本数据类型包装成对象,这样可以间接数据类型存进NSArray,NSDictionary。 void number(){ NSNumber *number=[NSNumber numberWithInt:10]; NSMutableArray *array=[NSMutableArray array]; [array addObject:number]; //进去... 阅读全文
摘要:
//NSMutableDictionary #import “Student.h” #pragma mark use of NSMutableDictionary void dictUse(){ Student *stu1=[Student studentWithName:@”stu1”]; Student *stu2=[Student studentWithName:@”stu2”]... 阅读全文
摘要:
上周末登了次山,回来就各种矫情犯懒。今天周四一周又要完蛋,我发现自己真的是对时间流逝无可奈何。然后中午看了把小码哥网站还有MJ博客什么的,各种首期班大爆照,心中羞愧无比。年纪大也不能放弃自己啊,要不人生怎么活?虽然我是第七期或者第八期的,现在也要做好准备啊。foundation快看完了,电脑下周才能... 阅读全文
摘要:
阅读全文