Skip to content

Instantly share code, notes, and snippets.

@raimon49
Last active October 10, 2015 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raimon49/3674083 to your computer and use it in GitHub Desktop.
Save raimon49/3674083 to your computer and use it in GitHub Desktop.
Objective-C憶えたことのメモ
// 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
// 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