objective c - How to pass method arguments to a selector -


if have method this:

- (void) foo { } 

then can access through selector this:

@selector(foo) 

but if have method this:

- (void) bar:(nsstring *)str arg2:(nsstring *)str2 {  } 

then how access through selector?

to handle arbitrary number of selectors should use nsinvocation, can handle 2 objects using standard performwithselector stuff

[foo performselector:@selector(bar:arg2:) withobject:obj1 withobject:obj2]


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -