点步

导航

2015年11月5日 #

简单描述断点续传

摘要: 1 // 下载结束之后,会调用 2 // location 临时文件保存目录 3 - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask 4 didFinish... 阅读全文

posted @ 2015-11-05 14:15 点步 阅读(219) 评论(0) 推荐(0) 编辑

DOM解析

摘要: // DOM 解析XML数据- (void)GDataXmlTest:(NSData *)data{ // 1.获得整个 XML文档 GDataXMLDocument *dom = [[GDataXMLDocument alloc] initWithData:data options:0 err... 阅读全文

posted @ 2015-11-05 14:06 点步 阅读(193) 评论(0) 推荐(0) 编辑

XML-SAX解析

摘要: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ // 创建网络请求 NSURL *url = [NSURL URLWithString:@"http://localhost/resources/vedios.x... 阅读全文

posted @ 2015-11-05 14:00 点步 阅读(152) 评论(0) 推荐(0) 编辑

序列化

摘要: // 序列化的过程. // 判断 OC的数据类型是否能够转换成 json 数据 // 只有 字典 和 数组,才可以转换成 json 数据. if ([NSJSONSerializationisValidJSONObject:dict]) { // 将字典转换成二进制数据 NSD... 阅读全文

posted @ 2015-11-05 13:52 点步 阅读(123) 评论(0) 推荐(0) 编辑

网络中常用方法

摘要: // 1.实例化一个请求对象 NSURL *url = [NSURL URLWithString:@"http://localhost/demo.json"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; // 2... 阅读全文

posted @ 2015-11-05 13:44 点步 阅读(141) 评论(0) 推荐(0) 编辑