メソッドの名前をNSStringのパラメーターでうけとってそれを後でselectorとして扱う方法を発見。
- (void)performThis:(NSString *)aString {
SEL aSelector = NSSelectorFromString(aString);
[self performSelector:aSelector withObject:nil afterDelay:2];
}
An archive of my battle for learning how to make an iPhone game, both coding and art.
勉強しながらプログラミングとグラフィックを全部一人で作ってしまうiPhoneゲーム製作戦記!
- (void)performThis:(NSString *)aString {
SEL aSelector = NSSelectorFromString(aString);
[self performSelector:aSelector withObject:nil afterDelay:2];
}
No comments:
Post a Comment