码迷,mamicode.com
首页 >  
搜索关键字:nsbundle    ( 385个结果
doc文件UIWebView 直接展示
NSString *path=[[NSBundle mainBundle]pathForResource:@"测试一" ofType:@"docx"]; //获取内容 NSData *data = [[NSData alloc]initWithContentsOfFile:path]; NSStri ...
分类:Web程序   时间:2016-04-27 01:45:01    阅读次数:278
UIImageView
#if 0 NSString *path = [[NSBundle mainBundle] resourcePath ]; NSString *imagePath = [NSString stringWithFormat:@"%@/qq.png",path]; UIImage *image = [[ ...
分类:其他好文   时间:2016-04-23 22:48:04    阅读次数:192
UIWebView加载本地网页与图片的方法
UIWebView加载工程本地网页与本地图片- (void)viewDidLoad{ [super viewDidLoad]; NSString *filePath = [[NSBundle mainBundle]pathForResource:@"1" ofType:@"html"]; NSStr ...
分类:Web程序   时间:2016-04-22 18:27:33    阅读次数:164
如何动态获取ios工程的Bundle version版本号,bundleID,appName
获取 bundle version版本号 +(NSString*) getLocalAppVersion { return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; } 获 ...
分类:移动开发   时间:2016-04-14 15:43:45    阅读次数:200
NSBundle
最简单创建bundle文件:创建一个文件夹更改文件夹名称为:xxx.bundle 向里面添加东西直接显示包内容复制进去就行了 bundle里面一般存一些资源文件比如图片,音乐,plist等当然也可以存nib文件,类文件里面也有相应的方法打开 得到bundle路径: 获取bundle里面的文件: 例子 ...
分类:其他好文   时间:2016-04-13 18:54:53    阅读次数:339
对plist文件的简单封装
常常会用到对plist文件的封装 +(NSArray *)LoadFriendsDataFromPlist:(NSString *)plistName{ NSString * filePath = [[NSBundle mainBundle]pathForResource:plistName ofT ...
分类:其他好文   时间:2016-03-31 21:39:47    阅读次数:124
IOS开发-UI学习-NSBundle和NSHomeDirectory的区别
NSBundle和NSHomeDirectory的区别 ...
分类:移动开发   时间:2016-03-30 15:05:02    阅读次数:1353
XML解析的几种方法
第一种方法系统自带的解析方法(NSXMLParser) //1、指定XML文件 NSString *path=[[NSBundle mainBundle] pathForResource:@"person" ofType:@"xml"]; //转换成data类型对象 NSData *data=[NS ...
分类:其他好文   时间:2016-03-28 23:33:08    阅读次数:309
NSBundle UIImageView &UIButton
1.NSBundle 1> 一个NSBundle代表一个文件夹,利用NSBundle能访问对应的文件夹 2> 利用mainBundle就可以访问软件资源包中的任何资源 3> 模拟器应用程序的安装路径 /Users/aplle/资源库/Application Support/iPhone Simula ...
分类:其他好文   时间:2016-03-28 21:38:35    阅读次数:170
IOS 杂笔-14(被人遗忘的owner)
*owner在开发中现在已经很少用了 有兴趣的童鞋可以看看* 我们遇到owner通常是在类似 [[[NSBundle mainBundle] loadNibNamed:@"Food" owner:nil options:nil]lastObject ]中遇到的。 我们一般的做法是直接把owner设置 ...
分类:移动开发   时间:2016-03-26 10:45:01    阅读次数:196
385条   上一页 1 ... 8 9 10 11 12 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!