zoukankan      html  css  js  c++  java
  • plist反序列化

    //

    //  ViewController.m

    //  03-plist文件的一个反序列化

    //

    //  Created by jerry on 15/9/28.

    //  Copyright (c) 2015年 jerry. All rights reserved.

    //

    #import "ViewController.h"

    @interface ViewController ()

    @end

    @implementation ViewController

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

        

        // 1.URL

        NSURL *url = [NSURL URLWithString:@"http://127.0.0.1/videos.plist"];

        

        // 2.请求

        NSURLRequest *request = [NSURLRequest requestWithURL:url];

        

        // 3.连接 connection

        [NSURLConnection sendAsynchronousRequest:request queue:[[NSOperationQueue alloc]init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {

           

            id result = [NSPropertyListSerialization propertyListWithData:data options:0 format:NULL error:NULL];

            NSLog(@"%@------%@",result,[result class]);

        }];

        

        

    }

    @end

  • 相关阅读:
    Linux常用命令
    安装最新版的wampserver,可以兼容php5和php7
    PHP程序员的技术成长规划
    ztreeSearch
    xmlUtil 解析 创建
    EXCEL 读取
    线程池 Future 带返回结果
    cxf 创建动态webService
    Map 和 javaBean转换
    线程池 http请求
  • 原文地址:https://www.cnblogs.com/pengpengzhang/p/4843401.html
Copyright © 2011-2022 走看看