摘要: 二张图片合并(添加水印等等)-(UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2{UIGraphicsBeginImageContext(image2.size);//Draw image2[image2 drawInRect:CGRectMake(0, 0, image2.size.width, image2.size.height)];//Draw image1[image1 drawInRect:CGRectMake(20, 20, image1.size.width, image1.size.height)]; 阅读全文
posted @ 2014-02-12 11:56 怒放紫罗兰 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 由于iOS的沙盒机制,所有的应用只能访问自己应用目录下的文件。iOS不像android,没有SD卡概念,不能直接访问图像、视频等内容。iOS应用产生的内容,如图像、文件、缓存内容等都必须存储在自己的沙盒内。默认情况下,每个沙盒含有3个文件夹:Documents, Library 和 tmp。Library包含Caches、Preferences目录。完整路径为:用户->资源库->Application Support->iPhone Simulator->6.1->Aplications获取应用沙盒根路径:-(void)dirHome{ NSString *dir 阅读全文
posted @ 2014-02-12 11:20 怒放紫罗兰 阅读(185) 评论(0) 推荐(0) 编辑