Last active
August 29, 2015 14:08
-
-
Save akuraru/b313921b1ab021f7da2d to your computer and use it in GitHub Desktop.
SwiftでperformSelectorを使うための何か
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 "NSObject+performSelector.h" | |
@implementation NSObject (performSelector) | |
- (void)call:(NSString *)sel { | |
[self performSelector:@selector(sel)]; | |
} | |
- (id)get:(NSString *)sel { | |
return [self performSelector:@selector(sel)]; | |
} | |
- (void)call:(NSString *)sel withObject:(id)obj1 { | |
[self performSelector:@selector(sel) withObject:obj1]; | |
} | |
- (id)get:(NSString *)sel withObject:(id)obj1 { | |
return [self performSelector:@selector(sel) withObject:obj1]; | |
} | |
- (void)call:(NSString *)sel withObject:(id)obj1 withObject:(id)obj2 { | |
[self performSelector:@selector(sel) withObject:obj1 withObject:obj2]; | |
} | |
- (id)get:(NSString *)sel withObject:(id)obj1 withObject:(id)obj2 { | |
return [self performSelector:@selector(sel) withObject:obj1 withObject:obj2]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment