首页 > 其他 > 详细

plist反序列化

时间:2015-09-28 11:38:20      阅读:164      评论:0      收藏:0      [点我收藏+]

//

//  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

 

plist反序列化

原文:http://www.cnblogs.com/pengpengzhang/p/4843401.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!