Skip to content

Instantly share code, notes, and snippets.

@kumpera
Created February 13, 2012 17:27
Show Gist options
  • Save kumpera/1818461 to your computer and use it in GitHub Desktop.
Save kumpera/1818461 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#include <stdio.h>
#include <objc/objc.h>
#include <objc/runtime.h>
#include <objc/message.h>
@interface Obj :NSObject
-(NSRect) test ;
@end
@implementation Obj
-(NSRect) test {
NSRect foo = NSMakeRect (1,2,3,4);
return foo;
}
@end
int main ()
{
Obj *t = [[Obj alloc] init];
NSRect r = [t test];
printf ("%f %f\n", r.origin.x, r.origin.y);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment