Created
January 24, 2014 02:35
-
-
Save keicoder/8591100 to your computer and use it in GitHub Desktop.
objective-c : make a property read-only to other objects but fully accessible to your own class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//make a property read-only to other objects but fully accessible to your own class | |
//.h file | |
//readonly | |
@property (nonatomic, readonly, strong) NSMutableArray *searchResults; | |
//.m file | |
//new class extension inside .m | |
//readwrite | |
@property (nonatomic, readwrite, strong) NSMutableArray *searchResults; | |
//synthesize the properties | |
@synthesize searchResults = _searchResults; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment