Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Slightly better name for swizzling method
Browse files Browse the repository at this point in the history
  • Loading branch information
JaviSoto committed Oct 21, 2012
1 parent dc05c02 commit b16af2f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions MSVCLeakHunter.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@ + (void)install
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[self swizzleMethod:@selector(viewDidAppear:)
withMethod:@selector(_msvcLeakHunter_viewDidAppear:)];
[self swizzleUIViewControllerSelector:@selector(viewDidAppear:)
withSelector:@selector(_msvcLeakHunter_viewDidAppear:)];

[self swizzleMethod:@selector(viewDidDisappear:)
withMethod:@selector(_msvcLeakHunter_viewDidDisappear:)];
[self swizzleUIViewControllerSelector:@selector(viewDidDisappear:)
withSelector:@selector(_msvcLeakHunter_viewDidDisappear:)];

[self swizzleMethod:NSSelectorFromString(@"dealloc")
withMethod:@selector(_msvcLeakHunter_dealloc)];
[self swizzleUIViewControllerSelector:NSSelectorFromString(@"dealloc")
withSelector:@selector(_msvcLeakHunter_dealloc)];
});

}

#pragma mark - Swizzling

+ (void)swizzleMethod:(SEL)originalSelector
withMethod:(SEL)newSelector
+ (void)swizzleUIViewControllerSelector:(SEL)originalSelector
withSelector:(SEL)newSelector
{
Class class = [UIViewController class];

Expand Down

0 comments on commit b16af2f

Please sign in to comment.