Calling function with 1 paremeter @ selector.

Posted by Mr. McPepperNuts on Stack Overflow See other posts from Stack Overflow or by Mr. McPepperNuts
Published on 2010-06-02T14:11:43Z Indexed on 2010/06/02 14:14 UTC
Read the original article Hit count: 196

Filed under:

I want to call this guy

-(void)addFavorite:(NSString *)favoriteToAdd

at, @selector here

action:@selector([addFavorite favoriteToAdd:@"string"])];

But I keep getting syntax error no matter which way I write it.

Can someone point out the appropriate way to call this function? When it had no parameter and was "addFavorite," it worked fine.

© Stack Overflow or respective owner

Related posts about objective-c