Fire button event programmatically

how to fire button event programmatically ?

Upvotes: 0

Views: 433

Answers (1)

Tom Irving
Tom Irving

Reputation: 10069

Your question is one of the vaguest I've seen, but I think you want something like this:

[button addTarget:self action:@selector(theMethodToBeCalled:) forControlEvents:UIControlEventTouchUpInside];

Then your method should look like this

- (void)theMethodToBeCalled:(id)sender {

}

Upvotes: 2

Related Questions