获取bundle文件下的资源
2016-05-07 15:38
309 查看
NSBundle* bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle].resourcePath stringByAppendingPathComponent:@"bundleName"]];
UIImage* img = [UIImage imageWithContentsOfFile:[bundle pathForResource:imageName ofType:@"png" inDirectory:[NSString stringWithFormat:@"文件名称%@",externPath]]];
UIImage* img = [UIImage imageWithContentsOfFile:[bundle pathForResource:imageName ofType:@"png" inDirectory:[NSString stringWithFormat:@"文件名称%@",externPath]]];
相关文章推荐
- c3p0和dbcp进行配置数据库连接池上的区别
- X86の唠唠叨叨
- Oracle中的通用函数,例如:NVL函数
- Unity如何实现磁铁效果?(比如跑酷游戏中,获得磁铁道具后,自动吸附附近金币的效果。)
- Java获取随机数的3种方法
- 统计字符串中各字符的个数
- jquery 点击空白处隐藏div元素
- Jmeter之WSDL(六)
- Jmeter之参数化(五)
- 一个在java运行时利用反射动态调用方法的例子
- 解决修改properties 属性文件存在缓存问题,附带操作properties文件工具类
- 学习 Vim 插件 DoxygenToolKit.vim
- 拷贝构造函数
- ios 获取本地音乐
- 服务器TIME_WAIT和CLOSE_WAIT详解
- 【剑指OFFER-二刷】
- 《一本书读懂法律常识》笔记
- 在ASP.NET 2.0中操作数据之二十三:基于用户对修改数据进行限制
- 11周2-2项目 - 存储班长信息的学生类,将Stu类的数据成员的访问权限改为private,你的程序是否能完成要求的功能?如果不行,请修改程序。请不要修改给出的代码,只能修改自己写的代码。
- leetcode_204_Count Primes(C++)(easy)