Skip to content

Instantly share code, notes, and snippets.

@neuro-sys
Last active August 29, 2015 14:10
Show Gist options
  • Save neuro-sys/4376f176e8ccea09ef89 to your computer and use it in GitHub Desktop.
Save neuro-sys/4376f176e8ccea09ef89 to your computer and use it in GitHub Desktop.
First Objective-C Program
#import <Foundation/Foundation.h>
@interface MyClass : NSObject
- (void)printHello:(NSString *) name;
@end
@implementation MyClass: NSObject
- (void)printHello:(NSString *) name
{
NSLog(@"Hello %@!", name);
NSLog(@"This is a second line %@!", name);
}
@end
int main()
{
MyClass *myClass = [[MyClass alloc] init];
[myClass printHello: @"Firat"];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment