調べてわかったのですが、複数パラメータを持つメソッドのSELは作成できるのですが(下記)、UIButtonなどのtarget-act
-(void)methodWith
NoArgument s;
SEL noArgumentSelector = @selector(methodWith NoArgument s); -(void)methodWith
OneArgumen t:(id)argument;
SEL oneArgumentSelector = @selector(methodWith OneArgumen t:); // notice the colon here -(void)methodWIth
TwoArgumen ts:(id)argumentOn e and:(id)argumentTw o;
SEL twoArgumentSelector = @selector(methodWith TwoArgumen ts:and:); // notice the argument names are omitted
ちなみに、自分でSELのメソッドを呼び出すときには、パラメータを渡す事は可能:
-performSe
lector:
-performSelector:wit hObject:
-performSelector:wit hObject:wi thObject:
senderでごにょごにょ
できないと言っても、if(sender == _myButton) {} とか sender.tag
Refs
How do SEL and @select work in iphone sdk?
http://stackoverflow .com/quest ions/29768 0/how-do-s el-and-sel ect-work-i n-iphone-s dk How to I pass @selector as a parameter?
http://stackoverflow .com/quest ions/93280 1/how-to-i -pass-sele ctor-as-a- parameter Help me understand
selector
http://www.cocos2d-i phone.org/ forum/topi c/844 AppleのドキュメントのSelectors項
http://developer.app le.com/doc umentation /Cocoa/Con ceptual/Ob jectiveC/A rticles/oc Selectors. html#//apple_re f/doc/uid/ TP30001163 -CH23-SW4