摘要: 九宫格作图// 添加应用信息 // 1,总列数(一行最多三列) int totalColumns =3; // 2,应用尺寸 CGFloat appW =85; CGFloat appH =90; // 3,间隙=(控制器view的宽度 -3*应用宽度)/4 CGFloat marginX =... 阅读全文
posted @ 2016-01-15 09:52 codingsunny 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1.修改不同文字和颜色 // 创建一个富文本 NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:@"哈哈哈哈哈123456789"]; // 修改富文... 阅读全文
posted @ 2016-01-21 20:07 codingsunny 阅读(3181) 评论(0) 推荐(0) 编辑
摘要: //获取当前时间 NSDate * nowDate = [NSDate date]; NSLog(@"date=%@",nowDate); //获取距离当前时间n秒以后的时间 NSDate *d2 = [NSDate dateWithTimeIntervalSinceNow:... 阅读全文
posted @ 2016-01-15 09:59 codingsunny 阅读(846) 评论(0) 推荐(0) 编辑
摘要: //1简单初始化 NSDictionary *dict=@{@"name":@"小明",@"qge":@"18"}; NSLog(@"%@",dict);//2 initWithDictionary 用一个字典初始化另一个字典 NSDictionary *dict1=[[NSDic... 阅读全文
posted @ 2016-01-15 09:57 codingsunny 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1,初始化一个NSFileManager 执行文件或文件夹的创建、删除、复制、移动 NSFileManager *manager = [NSFileManager defaultManager] 1.1创建文件夹 createDirectoryAtPath NSError *error =... 阅读全文
posted @ 2016-01-15 09:57 codingsunny 阅读(535) 评论(0) 推荐(0) 编辑
摘要: 1.initWithObjects 传入对象初始化NSArray *arr3 =[[NSArray alloc]initWithObjects:@"4",@"5",@"6", nil] ; NSLog(@"%@",arr3);2.initWithArray:用一个数组初始化新的数组 NSArra... 阅读全文
posted @ 2016-01-15 09:56 codingsunny 阅读(3345) 评论(0) 推荐(0) 编辑
摘要: 1.普通初始化字符串// 定义并初始化一个字符串 NSString *str=@"Hello World";2.求字符串长度//求字符串长度 NSLog(@"%lu",str.length);3.根据索引查找字符//根据索引查找字符,(unichar) unichar uni_char = [... 阅读全文
posted @ 2016-01-15 09:55 codingsunny 阅读(244) 评论(0) 推荐(0) 编辑