Skip to content

Instantly share code, notes, and snippets.

@PsychoH13
Created October 27, 2013 22:52
Show Gist options
  • Save PsychoH13/7188888 to your computer and use it in GitHub Desktop.
Save PsychoH13/7188888 to your computer and use it in GitHub Desktop.
// New Style.
// MyClass.h
@interface MyClass : NSObject
- (void)foo;
@end
// MyClass.m
#import "MyClass.m"
@implementation MyClass
- (void)foo
{
[self bar];
}
- (void)bar
{
// Something.
}
@end
// MyClass.m
#import "MyClass.m"
@interface MyClass ()
- (void)bar;
@end
@implementation MyClass
- (void)foo
{
[self bar];
}
- (void)bar
{
// Something.
}
@end
// Old style #2.
// MyClass.h
@interface MyClass : NSObject
- (void)foo;
@end
// MyClass.m
#import "MyClass.m"
@implementation MyClass
- (void)bar
{
// Something.
}
- (void)foo
{
[self bar];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment