04-plis属性列表
- 源代码下载链接:04-plis属性列表.zip
27.8 KB -
// MJPerson.h
- //
- // MJPerson.h
- // 04-plis属性列表
- //
- // Created by apple on 13-12-11.
- // Copyright (c) 2013年itcast. All rights reserved.
- //
- #import<Foundation/Foundation.h>
- @interfaceMJPerson : NSObject
- @property(nonatomic,copy) NSString *name;
- @end
-
// MJPerson.m
Map - //
- // MJPerson.m
- // 04-plis属性列表
- //
- // Created by apple on 13-12-11.
- // Copyright (c) 2013年itcast. All rights reserved.
- //
- #import"MJPerson.h"
- @implementationMJPerson
- @end
-
// QQViewController.h
Map - //
- // QQViewController.h
- // 04-plis属性列表
- //
- // Created by apple on 13-12-11.
- // Copyright (c) 2013年itcast. All rights reserved.
- //
- #import<UIKit/UIKit.h>
- @interfaceQQViewController : UIViewController
- @end
-
// QQViewController.m
Map - //
- // QQViewController.m
- // 04-plis属性列表
- //
- // Created by apple on 13-12-11.
- // Copyright (c) 2013年itcast. All rights reserved.
- //
- #import"QQViewController.h"
- #import"MJPerson.h"
- @interfaceQQViewController ()
- @end
- @implementationQQViewController
- - (void)viewDidLoad
- {
- [superviewDidLoad];
- // NSArray *array = @[@"4343", @"gfdgdfg"];
- MJPerson *p = [[MJPerson alloc] init];
- p.name =@"jack";
- //本文永久链接,转载请注明出处:http://www.cnblogs.com/ChenYilong/p/3490657.html
- NSArray *array =@[@{
- @"name": p.name
- }];
- [array writeToFile:@"/Users/apple/Desktop/ppp.plist"atomically:YES];
- }
- @end
作者:
出处:http://www.cnblogs.com/ChenYilong/(点击RSS订阅)
本文版权归作者和博客园共有,欢迎转载,
但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。