Skip to content

Instantly share code, notes, and snippets.

@SquaredTiki
Created August 19, 2011 11:21
Show Gist options
  • Save SquaredTiki/1156604 to your computer and use it in GitHub Desktop.
Save SquaredTiki/1156604 to your computer and use it in GitHub Desktop.
@implementation NSApplication (PlayChanger)
- (void)PlayChanger_playpause {
NSLog(@"Play Changer's playpause called!");
}
@end
@implementation PlayChanger
+ (void)load
{
NSLog(@"Play Change Loaded");
NSError *error = NULL;
[NSClassFromString(@"iTunesApplication") jr_swizzleMethod:@selector(playpause) withMethod:@selector(PlayChanger_playpause) error:&error];
if (error != NULL)
NSLog(@"Erorr! %@", error);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment