IOS: include sender in IBAction declaration?

I have a better experience / stylistic question. Say I have an IBAction method and I don’t need a sender parameter (I know how to use a sender parameter if I need one). Do you recommend leaving the sender (id) in the method declaration for consistency or excluding it for brevity? Functionally, there is no right answer, just curious what people consider to be the best practice for maintainability / expert evaluation / etc. Thank.

Option A:

-(IBAction)foo:(id)sender;

Option B:

-(IBAction)foo;
+5
source share
3 answers

"". , , , , ( ). .

+2

, . : docs , . : , .

+1

, . , IB, , .

+1

All Articles