码迷,mamicode.com
首页 >  
搜索关键字:nsbundle    ( 385个结果
mainBundle和CustomBundle
iOS中NSBundle类An NSBundle object represents a location in the file system that groups code and resources that can be used in a program. NSBundle object...
分类:其他好文   时间:2015-12-29 14:26:01    阅读次数:552
webView 加载本地html css javascript文件路径尝试
一:UIWebView加载数据的方式有三种: 1:- (void)loadRequest:(NSURLRequest*)request NSString * path = [[NSBundle mainBundle] pathForResource:@"demoFolder" ofType:...
分类:编程语言   时间:2015-12-25 21:06:23    阅读次数:398
IOS 多媒体加载 加载音频 AVAudioPlayer
IOS加载音频文件 需要导入#import 1 NSString *path = [[NSBundle mainBundle] pathForResource:@"胭脂泪" ofType:@"mp3"]; //把音频文件转换成url格式 2 3 NSURL *urlStr ...
分类:移动开发   时间:2015-12-25 19:00:25    阅读次数:400
imageNamed、imageWithContentsOfFile、imageWithData
[UIImage imageNamed:ImageName];1、加载图片占据的内存较大2、相同的图片只会加载一份到内存中,如果同时使用,使用同一个对象即可3、当对象销毁,图片对象不会随着一起销毁NSString *path = [[NSBundle mainBundle] pathForResou...
分类:其他好文   时间:2015-12-23 21:12:19    阅读次数:278
xib添加手势后报错:-[UITapGestureRecognizer setFrame:]: unrecognized selector sent to instance xxx
主要原因如下:+ (instancetype)mineHeaderView{ return [[NSBundle mainBundle] loadNibNamed:@"DDMineHeaderView" owner:nil options:nil].lastObject;}添加手势后, 以上的...
分类:其他好文   时间:2015-12-22 16:08:09    阅读次数:484
parse Json
一、数据来源1.来源于mainBundle2.来源于服务器二、解析步骤`1.数据来源于mainBundle//读取数据 NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"test.json" ofType:nil];解析数据(...
分类:Web程序   时间:2015-12-18 00:05:57    阅读次数:310
NSBundle、NSArray、NSDictionay
NSBundle、NSArray、NSDictionay读取plist文件NSDictionary*dict= [NSDictionarydictionaryWithContentsOfFile:[[NSBundlemainBundle]pathForResource:@"fileName"ofTy...
分类:其他好文   时间:2015-12-17 23:56:01    阅读次数:156
iOS开发读取plist内容
ios开发中会用到plist保存数据,读取plist数据只需要一行代码就行:NSArray * appInfos = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"appslist" ofType:...
分类:移动开发   时间:2015-12-07 00:24:04    阅读次数:156
iOS加载xib方法
使用bundle加载xib,代码如下: UIView *appInfoView = [[[NSBundle mainBundle] loadNibNamed:@"xibName" owner:nil options:nil] lastObject]; [self.view addSubview:ap...
分类:移动开发   时间:2015-12-06 12:52:19    阅读次数:1129
ios – 使用UINib加载xib文件实现UITableViewCell
xib文件的实质是xml,描述界面对象,每个对象都有一个很重要的属性,identity inspector面板中class属性,加载xib文件的时候实际上是实例化界面对象相对应的这些class。xib文件的加载过程: 1.将xib文件从磁盘载入内存,有两种技术可以加载xib文件:NSBundle和U...
分类:移动开发   时间:2015-12-05 19:16:47    阅读次数:195
385条   上一页 1 ... 11 12 13 14 15 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!