Link to home
Start Free TrialLog in
Avatar of Snapples
Snapples

asked on

Selector with arguments

Hi experts,

I'm really new to iOS programming (a week in fact) and I was wondering if anyone could tell me how to pass a selector with arguments in a method.

I get the "Expected ')'  before '(' token error.

How do I do this correctly?
Thanks in advance.
// This is the method
-(void)setIsEditing:(BOOL)editing


// This is what I'm trying to do and should be doing according to the documentation, but it gives an error
      UIBarButtonItem* rightButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(setIsEditing:YES)];

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of SpeedyApocalypse
SpeedyApocalypse
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial