Last active
October 10, 2015 10:08
-
-
Save raimon49/3674083 to your computer and use it in GitHub Desktop.
Objective-C憶えたことのメモ
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
// vim:ft=objc:ts=2:sts=2:sw=2 | |
@interface MyClass : NSObject | |
@property (nonatomic, readonly, copy) NSString *publicProperty; | |
@property (nonatomic, copy) NSString *protectedProperty; | |
- (void)pubilcMethod; | |
@end |
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
// vim:ft=objc:ts=2:sts=2:sw=2 | |
@interface MyClass() | |
@property (nonatomic, readwrite) NSString *privateProperty; | |
@end | |
@implementation MyClass | |
- (id)init | |
{ | |
if (self = [super init]) { | |
_publicProperty = @"public"; | |
_protectedProperty = @"protected"; | |
_privateProperty = @"private"; | |
} | |
return self; | |
} | |
- (void)pubilcMethod | |
{ | |
// implement public method | |
} | |
- (void)privateMethod | |
{ | |
// implement private method | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment