摘要: iPhoneApp获取文件教程是本文要介绍的内容,对于一个运行在iPhone得app,它只能访问自己根目录下得一些文件(所谓sandbox).一个app发布到iPhone上后,它得目录结构如下: 1、其中得 approot可以用 NSHomeDirectory() 访问到; 2、Documents 目录就是我们可以用来写入并保存文件得地方,一般可通过:NSArray*paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString*documentsDirector... 阅读全文
posted @ 2011-11-29 18:52 el. 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 上代码!关键代码: UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; [pasteboard setString:@"南方基地"]; 阅读全文
posted @ 2011-11-29 18:34 el. 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 不解释,直接上代码 NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; NSString *name = [infoDictionary objectForKey:@"CFBundleDisplayName"]; NSString *version = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; NSString *build = [infoDictionary objectForKey: 阅读全文
posted @ 2011-11-29 15:42 el. 阅读(2919) 评论(0) 推荐(0) 编辑