//2种方式获取文件
NSBundle *bundle = [NSBundlemainBundle];
//第一种
NSString *path = [[bundle resourcePath] stringByAppendingPathComponent:@"city.plist"];
//第二种
NSString *path = [bundle pathForResource:@"city"ofType:@"plist"];
Super_linux 博主文章分类:objective-c ©著作权
文章标签 获取资源文件的两种方式 文章分类 移动开发
//2种方式获取文件
NSBundle *bundle = [NSBundlemainBundle];
//第一种
NSString *path = [[bundle resourcePath] stringByAppendingPathComponent:@"city.plist"];
//第二种
NSString *path = [bundle pathForResource:@"city"ofType:@"plist"];
上一篇:一些常用UI控件汇总
获取资源文件Properties的三
获取资源文件1.采用ServletContext对象获取特征:必须有web环境,任意文件,任意路径。public void doGet(HttpServletRequest
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M