//
// ViewController.m
// 08-plist解析
//
// Created by 唐帅 on 16/7/10.
// Copyright © 2016年 tang. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSURL *url = [NSURL URLWithString:@"http://127.0.0.1/videos.plist"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) {
if (connectionError == nil) {
id result = [NSPropertyListSerialization propertyListWithData:data options:0 format:nil error:nil];
NSLog(@"%@",result);
}
}];
}
@end