码迷,mamicode.com
首页 >  
搜索关键字:oftype    ( 200个结果
解析json数据
解析json数据//找到json路径NSString*filePath=[[NSBundlemainBundle]pathForResource:@"us_box"ofType:@"json"];//从路径中获取数据NSData*data=[NSDatadataWithContentsOfFile:filePath];//解析json------>转换成NSDictionary或者是NSArray//在iOS5.0之前解析json数据使用..
分类:Web程序   时间:2015-09-02 19:22:35    阅读次数:166
播放视频
//初始化url NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"abc" ofType:@"mp4"]]; //初始化播放视频 moviePlayer =[[MPMoviePlayerCo.....
分类:其他好文   时间:2015-08-27 20:49:58    阅读次数:133
iOS 开发,csv 转 plist
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"config_region" ofType:@"csv"]; NSString *text = [NSString stringWithContentsOfFile:fil.....
分类:移动开发   时间:2015-08-25 19:07:16    阅读次数:897
json解析 本地文件和网上文件(通过接口)
json解析对本地文件解析NSString *path =[[NSBundle mainBundle] pathForResource:@“movielist” ofType:@“txt”];// 第二个参数,制定一个容器来接收解析后的数据NSMutableDictionary *dic =[NSJSONSerialization JSONObjectWithData:data option:NSJ...
分类:Web程序   时间:2015-08-17 23:52:45    阅读次数:363
iphone之打开pdf、doc、xls文件用UIWebView
//文件名字及类型 NSString *path=[[NSBundle mainBundle]pathForResource:@"xls1" ofType:@"xls"]; //获取内容 NSData *data = [[NSData alloc]initWithContentsO...
分类:Web程序   时间:2015-08-15 00:10:28    阅读次数:203
在UIView中添加应用下载信息模块
-(void)willMoveToSuperview:(UIView *)newSuperview { NSString *path = [[NSBundle mainBundle]pathForResource:@"books.plist" ofType:nil]; _books = [NSArray arrayWithContentsOfFile:path]; ...
分类:其他好文   时间:2015-08-13 12:26:49    阅读次数:132
模态方法解析字典中的数据
通过模态的方法把数组中的字典中的数组放到一个数组中,并可以用点语法实现调用1.解析数据:代码:NSString *path =[[NSBundle mainBundle] pathForResource:@"StudentArr" ofType:@"plist"]; self.stuArr =[NSMutableArray arrayWithContentsOfFile:path];...
分类:其他好文   时间:2015-08-12 10:14:57    阅读次数:128
.plist
NSString *path = nil; ? ? path = [[NSBundle mainBundle] pathForResource:@"AreaBBSPlist" ofType:@"plist"]; ? ? NSArray *pathArray = [NSArray arrayWithContentsOfFile:path]; ? ? for (int i=‘A‘...
分类:其他好文   时间:2015-08-09 22:45:01    阅读次数:162
将GIF图转化为UIImageView可展示的动画数组
如何将gif转化为图片数组,ios开发//引入头文件#import - (NSMutableArray *)loadGifArray{ NSString *path = [[NSBundle mainBundle] pathForResource:@"pross" ofType:@"gif"]...
分类:编程语言   时间:2015-08-08 16:13:15    阅读次数:154
接收到推送消息时,提示声音
在需要声音的类里直接粘贴复制: NSString *path = [[NSBundle mainBundle] pathForResource:@"OrderMusic" ofType:@"wav"]; if (path) { //注册声音到系统 AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NS...
分类:其他好文   时间:2015-08-05 18:39:43    阅读次数:138
200条   上一页 1 ... 11 12 13 14 15 ... 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!