Posted By

gerhardsletten on 09/16/09


Tagged


Versions (?)

Objective C - Properties


 / Published in: Objective C
 

  1. // SomeClass.h
  2.  
  3. #import <Foundation/Foundation.h>
  4.  
  5. @interface SomeClass : NSObject {
  6. int mynumber;
  7. NSString *mystring;
  8. }
  9.  
  10. @property(readwrite/readonly, assign/retain/copy, nonatomic) int mynumber;
  11. @property(readwrite/readonly, assign/retain/copy, nonatomic) NSString* mystring;
  12.  
  13. @end
  14.  
  15. // SomeClass.m
  16.  
  17. #import "SomeClass.h"
  18. @implementation SomeClass
  19.  
  20. @synthesize mynumber, mystring;
  21.  
  22. @end

Report this snippet  

You need to login to post a comment.