摘要: // date方法返回的就是当前时间(now) 02. NSDate *date = [NSDate date]; 03.// now: 11:12:40 04.// date: 11:12:50 05. date = [NSDate dateWithTimeIntervalSinceNo... 阅读全文
posted @ 2014-08-17 23:47 BugShow 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 一、NSdata的概念1、使用文件时需要频繁地将数据读入一个临时存储区,它通常称为缓冲区2、NSdata类提供了一种简单的方式,它用来设置缓冲区,将文件的内容读入缓冲区,或者将缓冲区内容写到一个文件。3、对于32位应用程序,NSdata缓存最多2GB4、我们有两种定义 NSData(不可变缓冲区),... 阅读全文
posted @ 2014-08-17 23:42 BugShow 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 一、NSnumber常见用法NSNumber+ (NSNumber *)numberWithInt:(int)value;+ (NSNumber *)numberWithDouble:(double)value;- (int)intValue;- (double)doubleValue;-(floa... 阅读全文
posted @ 2014-08-17 23:28 BugShow 阅读(1669) 评论(0) 推荐(0) 编辑
摘要: 一、创建数组// 创建一个空的数组 02.NSArray *array = [NSArray array]; 03.// 创建有1个元素的数组 04.array = [NSArray arrayWithObject:@"123"]; 05.// 创建有多个元素的数组 06.arra... 阅读全文
posted @ 2014-08-17 23:18 BugShow 阅读(506) 评论(0) 推荐(0) 编辑
摘要: iOS NSString的常用用法 //1、创建常量字符串。NSString *astring = @"This is a String!"; //2、创建空字符串,给予赋值。NSString *astring = [[NSString alloc] init]; astring = @"This ... 阅读全文
posted @ 2014-08-17 22:40 BugShow 阅读(253) 评论(0) 推荐(0) 编辑