解析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
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"config_region" ofType:@"csv"]; NSString *text = [NSString stringWithContentsOfFile:fil.....
分类:
移动开发 时间:
2015-08-25 19:07:16
阅读次数:
897
json解析对本地文件解析NSString *path =[[NSBundle mainBundle] pathForResource:@“movielist” ofType:@“txt”];// 第二个参数,制定一个容器来接收解析后的数据NSMutableDictionary *dic =[NSJSONSerialization JSONObjectWithData:data option:NSJ...
分类:
Web程序 时间:
2015-08-17 23:52:45
阅读次数:
363
//文件名字及类型 NSString *path=[[NSBundle mainBundle]pathForResource:@"xls1" ofType:@"xls"]; //获取内容 NSData *data = [[NSData alloc]initWithContentsO...
分类:
Web程序 时间:
2015-08-15 00:10:28
阅读次数:
203
-(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
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转化为图片数组,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