an exercise in learning GLKit which turned into exercise learning more about foundation
C++ C Shell Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
BoostWorkaround/boost
assimp
contrib
include
singleViewGLKitCube.xcodeproj
singleViewGLKitCube
singleViewGLKitCubeTests
README.md
axe.jpg
dwarf.jpg
dwarf.x
revision.h

README.md

This is just a test

  • ViewController.m has all the goods

the goods look like this:

@interface Delegate : NSObject { void (^_callback)(id sender); id _sender; } -(void)invoke; @end

@implementation Delegate -(Delegate*)initWithCallback:(void(^)(id sender)) callback andSender:sender { if (self = [super init]) { _callback = callback; _sender = sender; } return self; } -(void)invoke { _callback(_sender); } @end

@interface UIButton (stuff) { }

  • (void)addTarget:(void (^)(id sender))block forControlEvents:(UIControlEvents)controlEvents; @end @implementation UIButton (stuff)

  • (void)addTarget:(void (^)(id))block forControlEvents:(UIControlEvents)controlEvents { Delegate *del = [[Delegate alloc] initWithCallback:block andSender:self]; [self addTarget:del action:@selector(invoke) forControlEvents:controlEvents]; } @end