Skyler
Skyler

Reputation: 2864

Does every action method need a sender object?

Can I just omit the parameter completely? I cannot seem to find a use for it within my IBAction method.

Upvotes: 2

Views: 119

Answers (1)

Olotiar
Olotiar

Reputation: 3274

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

Upvotes: 1

Related Questions