Created
May 2, 2012 18:33
-
-
Save corosukeK/2579032 to your computer and use it in GitHub Desktop.
AfterSwizzling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "SwizzlingTest.h" | |
#import </usr/include/objc/objc-class.h> | |
@interface Swizzlingee : NSObject | |
- (NSString *) hoge; | |
- (NSString *) piyo; | |
@end | |
@implementation Swizzlingee | |
// hogeとpiyoを交換したら・・・ | |
- (void)hoge | |
{ | |
NSLog(@"piyo"); | |
[self piyo]; | |
} | |
- (void)piyo | |
{ | |
NSLog(@"hoge"); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment