views:

60

answers:

1

how to fire button event programatically ?

+2  A: 

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 {

}
Tom Irving
I am using the same code for calling the button event, but i need the event for one button fired immediately when the application loads
chaitanya
So you want to fire method when the application loads? Like [self doMethod];
Tom Irving