Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@daveverwer
Forked from richardjkeys/method.m
Created October 24, 2011 10:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daveverwer/1308759 to your computer and use it in GitHub Desktop.
Save daveverwer/1308759 to your computer and use it in GitHub Desktop.
Block Method Call Example
- (void) buyFeature:(NSString*) featureId onComplete:(void (^)(NSString*)) completionBlock onCancelled:(void (^)(void)) cancelBlock;
//method call
[[MKStoreKit sharedManager] buyFeature:[product objectForKey:@"identifier"]
onComplete:^ (NSString *something) {
NSLog(@"Transaction Complete");
} onCancelled:^ {
NSLog(@"Purchase Cancelled");
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment