Created
October 7, 2013 21:52
-
-
Save jchudzynski/6875562 to your computer and use it in GitHub Desktop.
Objective-C Class Example
This file contains 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
//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 |
This file contains 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
#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