Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

if the method" [aClass respondsToSelector:@selector(fun)]"'s fun had three parameter

Tags:

ios

some one can tell me

I used this method "[aClass respondsToSelector:@selector(fun)]" to find if there was a fun in any class

but when the fun had three parameter how can i deal with it??

thanks

like image 389
user1052163 Avatar asked Aug 16 '12 02:08

user1052163


1 Answers

In the selector each colon (:) is a parameter. for method - (id)funWithA:(id)a B:(id)b C:(id)c

[aClass respondsToSelector:@selector(funWithA:B:C:)];

If there is no text between the parameters - (id)fun:(id)a :(id)b :(id)c

[aClass respondsToSelector:@selector(fun:::)];
like image 103
Jeffery Thomas Avatar answered Nov 16 '22 03:11

Jeffery Thomas