Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created July 25, 2017 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olbrichj/799fe458fb9fd9033c6f444b1b34684d to your computer and use it in GitHub Desktop.
Save olbrichj/799fe458fb9fd9033c6f444b1b34684d to your computer and use it in GitHub Desktop.
+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSError *error;
BOOL result = [[self class] jr_swizzleMethod:@selector(text) withMethod:@selector(swizzleName) error:&error];
if (!result || error) {
NSLog(@"Can't swizzle methods - %@", [error description]);
}
});
}
- (NSString *)swizzleName {
return @"StubName";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment