Most likely a dumb question, but what’s the difference between:
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Join" style:UIBarButtonItemStylePlain
target:self action:@selector(pressJoinButton)];
and
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Join" style:UIBarButtonItemStylePlain
target:self action:@selector(pressJoinButton:)];
Notice how one is pressJoinButton, and the other is pressJoinButton:
The colon is used to add arguments to the method you are calling, so if pressJoinButton had zero arguments, it would be:
If it had one argument, it would be:
if it had 2 arguments, it would be:
if it had 3 arguments it would be:
etc
Hope this helps!