AFNetworking获取服务端plist文件,XML文件
来源:互联网 发布:数据录入项目外包 编辑:程序博客网 时间:2024/05/17 01:44
本人向来不喜欢啰嗦,只喜欢简单粗暴,上代码!!!
注意:你需要下载一个开源的AFNetworking包,版本很多,本人提供一个网盘下载地址: http://pan.baidu.com/s/1jGzmyea
请速度收藏
NSString *urlString=@"http://127.0.0.1:8080/app/test.plist"; NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [AFPropertyListRequestOperation addAcceptableContentTypes:[NSSet setWithObject:@"application/xml"]]; AFPropertyListRequestOperation *operation = [AFPropertyListRequestOperation propertyListRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList) {// NSLog(@" - - - - - - - - - - %@ - - —!__!_!_!_!_",[propertyList class]); [arrList removeAllObjects]; if ([propertyList isKindOfClass:[NSArray class]]) { NSArray *arr=(NSArray *)propertyList; [arrList addObjectsFromArray:arr]; [table reloadData]; } [table headerEndRefreshing]; }failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList) { NSLog(@"!!!!! %@",error); [table headerEndRefreshing]; }]; [operation start];
0 0
- AFNetworking获取服务端plist文件,XML文件
- 获取plist文件信息
- 获取info.plist文件
- 获取plist文件的路径
- IOS获取plist文件信息
- XML文件转换成plist文件
- python 二进制Plist文件转Xml格式Plist
- unity3d读取plist或xml文件
- plist文件
- plist文件
- plist文件
- Plist文件
- plist文件
- plist 文件
- Plist文件
- plist文件
- 获取iphone模拟器程序中的plist文件
- 如何获取Info.plist文件信息
- 注解开发spring-aop 入门
- 定义一个功能,记录程序运行的次数。满足5次后,给出提示,试用次数已到,请注册
- 2015062910 - 一周搞定Effective java
- 输入框只能输入数字 以及其他限制的总结
- POJ 3592 强连通缩点+spfa最长路
- AFNetworking获取服务端plist文件,XML文件
- android searchView加ListView共同使用
- 2015年6月29日 课设日志
- Eclipse 远程调试
- UVa-512(经典栈)
- ImageLoader 线程池 单例 使用模板
- 【NGUI】NGUI血条制作,当人物移出屏幕后不显示血条,优化代码
- c3p0的DriverManagerDataSource源代码看单例
- LeetCode Simplify Path