2015年4月14日
摘要: 转载自:http://arc9.riaos.com/?p=4980cyy:自我理解,不保证正确,但亲自试验确实可行:若用stringByAppendingString 则需要手动在名称前加 “/”符号,而stringByAppendingPathComponent则不需要,它会自动添加stringB... 阅读全文
posted @ 2015-04-14 17:54 墓厄 阅读(433) 评论(0) 推荐(0) 编辑
摘要: //file文件操作NSFileManager 常见的NSFileManager文件的方法:-(BOOL)contentsAtPath:path 从文件中读取数据-(BOOL)createFileAtPath:path contents:(BOOL)data attri... 阅读全文
posted @ 2015-04-14 17:53 墓厄 阅读(499) 评论(0) 推荐(0) 编辑
  2015年4月13日
摘要: 如果要弹出一个自定义的window,可以创建一个新的window xib文件,并通过NSBundle来加载。xib的window属性有一个选项,就是visible at lauch,如果勾选的,执行下面代码时: [NSBundle loadNibNamed: @"RegisterWindow"... 阅读全文
posted @ 2015-04-13 14:02 墓厄 阅读(847) 评论(0) 推荐(0) 编辑
  2015年1月31日
摘要: 1、在Documents里创建目录创建一个叫test的目录,先找到Documents的目录,[cpp]view plaincopyNSArray*paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMas... 阅读全文
posted @ 2015-01-31 16:42 墓厄 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1.iPhone会为每一个应用程序生成一个私有目录,这个目录位于:/Users/sundfsun2009/Library/Application Support/iPhone Simulator/User/Applications下,并随即生成一个数字字母串作为目录名,在每一次应用程序启动时,这个字... 阅读全文
posted @ 2015-01-31 09:48 墓厄 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 一、每个iOS应用SDK都被限制在“沙盒”中,“沙盒”相当于一个加了仅主人可见权限的文件夹,苹果对沙盒有以下几条限制。 (1)、应用程序可以在自己的沙盒里运作,但是不能访问任何其他应用程序的沙盒。 (2)、应用程序间不能共享数据,沙盒里的文件不能被复制到其他应用程序文件夹中,也不能把其他应用程序... 阅读全文
posted @ 2015-01-31 09:43 墓厄 阅读(284) 评论(0) 推荐(0) 编辑
  2015年1月30日
摘要: //扫描本地音乐文件,返回艺术家列表 需要库MediaPlayer.framework -(NSArray*) findArtistList { NSMutableArray *artistList = [[NSMutableArray alloc]init]; MPMedia... 阅读全文
posted @ 2015-01-30 21:18 墓厄 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 1.访问音乐库的两种方法,如下图(只能访问音频文件,如music,podcast,audiobook等)2.MPMusicPlayerController的使用有两种播放器可以选择,一种是application music player,另外一种是iPod music player。第一种播放器是一... 阅读全文
posted @ 2015-01-30 21:05 墓厄 阅读(433) 评论(0) 推荐(0) 编辑
  2015年1月29日
摘要: //关闭应用程序- (void)exitApplication { [UIView beginAnimations:@"exitApplication" context:nil]; [UIView setAnimationDuration:0.5]; [UI... 阅读全文
posted @ 2015-01-29 14:22 墓厄 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1.获取缓存目录//获取缓存文件路径-(NSString *)getCachesPath{ // 获取Caches目录路径 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDoma... 阅读全文
posted @ 2015-01-29 14:21 墓厄 阅读(5855) 评论(0) 推荐(0) 编辑