摘要: 常用字面量 NSString *string = @"easydaylife"; NSNumber *number = @(2014); NSArray *array = @[@"easy",@"day",@"life"]; NSDictionary *dictionary ... 阅读全文
posted @ 2014-05-18 12:33 easydaylife 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 将结构体包装成 NSValue ,并取出结构体1 NSRect rect = {0, 0, 200,200};2 NSValue *rectValue = [NSValue valueWithBytes:&rect objCType:@encode(NSRect)];3 NS... 阅读全文
posted @ 2014-05-18 10:43 easydaylife 阅读(187) 评论(0) 推荐(0) 编辑
摘要: -1 NSString 转成NSDate NSString *time = @"2014-05-18 09:24:40"; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; dateFormatter.... 阅读全文
posted @ 2014-05-18 10:10 easydaylife 阅读(343) 评论(0) 推荐(0) 编辑