Skip to content

Instantly share code, notes, and snippets.

@jchudzynski
Created October 7, 2013 21:52
Show Gist options
  • Save jchudzynski/6875562 to your computer and use it in GitHub Desktop.
Save jchudzynski/6875562 to your computer and use it in GitHub Desktop.
Objective-C Class Example
//import necessary frameworks
#import <Foundation/Foundation.h>
//public interface
@interface MyClass : SuperclassOfMyclass
{
//public members declarations
int member1;
}
//public methods declarations
-(void)doSomething;
+(void)doNothing;
@end
#import "MyClass.h"
//private interface
@interface MyClass()
//private method
-(void)count;
@end
@implementation MyClass
-(void)count{
}
-(void)doSomething{
// TO DO
}
+(void)doNothing{
// TO DO
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment