04-plis属性列表

 

  1. 源代码下载链接:04-plis属性列表.zip
    27.8 KB
  2. // MJPerson.h

  3. //
  4. //  MJPerson.h
  5. //  04-plis属性列表
  6. //
  7. //  Created by apple on 13-12-11.
  8. //  Copyright (c) 2013itcast. All rights reserved.
  9. //

  10. #import<Foundation/Foundation.h>

  11. @interfaceMJPerson : NSObject
  12. @property(nonatomic,copy) NSString *name;
  13. @end
  14. // MJPerson.m

    Map
  15. //
  16. //  MJPerson.m
  17. //  04-plis属性列表
  18. //
  19. //  Created by apple on 13-12-11.
  20. //  Copyright (c) 2013itcast. All rights reserved.
  21. //

  22. #import"MJPerson.h"

  23. @implementationMJPerson

  24. @end
  25. // QQViewController.h

    Map
  26. //
  27. //  QQViewController.h
  28. //  04-plis属性列表
  29. //
  30. //  Created by apple on 13-12-11.
  31. //  Copyright (c) 2013itcast. All rights reserved.
  32. //

  33. #import<UIKit/UIKit.h>

  34. @interfaceQQViewController : UIViewController

  35. @end
  36. // QQViewController.m

    Map
  37. //
  38. //  QQViewController.m
  39. //  04-plis属性列表
  40. //
  41. //  Created by apple on 13-12-11.
  42. //  Copyright (c) 2013itcast. All rights reserved.
  43. //

  44. #import"QQViewController.h"
  45. #import"MJPerson.h"

  46. @interfaceQQViewController ()

  47. @end

  48. @implementationQQViewController

  49. - (void)viewDidLoad
  50. {
  51.     [superviewDidLoad];
  52.    
  53. //    NSArray *array = @[@"4343", @"gfdgdfg"];
  54.    
  55.    
  56.     MJPerson *p = [[MJPerson alloc] init];
  57.     p.name =@"jack";
  58.    //本文永久链接,转载请注明出处:http://www.cnblogs.com/ChenYilong/p/3490657.html
  59.     NSArray *array =@[@{
  60.                           @"name"p.name
  61.                           }];
  62.    
  63.     [array writeToFile:@"/Users/apple/Desktop/ppp.plist"atomically:YES];
  64. }
  65. @end

 

https://www.evernote.com/shard/s227/sh/198ecac9-0ae1-4107-9424-e906f27edb6b/559b11fa4d1e0949e5df25d9063e1b64

你可能感兴趣的:(属性)