Can I just omit the parameter completely? I cannot seem to find a use for it within my IBAction method.
Asked
Active
Viewed 117 times
1 Answers
1
Yes, you can omit it if you don't want it:
-(IBAction)action{
// some stuff
}
Although it can come in handy in a lot of situations
Source : Apple Doc

Olotiar
- 3,225
- 1
- 18
- 37
-
[inputBox addTarget:self action:@selector(display:nil) forControlEvents:UIControlEventEditingDidEndOnExit]; because unfortunately this is not syntactically correct somehow – Skyler Jul 22 '12 at 18:34
-
[inputBox addTarget:self action:@selector(display) forControlEvents:UIControlEventEditingDidEndOnExit]; is, if the method is defined like -(void)display{ // stuff } – Olotiar Jul 22 '12 at 18:35
-
Oh wow, I see, I sort of had that earlier before adding nil, had a leftover colon. Thank you Olotiar. – Skyler Jul 22 '12 at 18:42