Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to handle button onclick action in iPhone without using interface builder?

how to handle button onclick action in iPhone without using interface builder?

like image 656
suse Avatar asked Mar 04 '10 07:03

suse


1 Answers

After you create a button write;

[myButton addTarget:self action:@selector(buttonAction) forControlEvents:UIControlEventTouchUpInside];

Edit

Also implement this in your .m file

-(void)buttonAction
{
    //your implementation
}
like image 130
EEE Avatar answered Oct 18 '22 05:10

EEE



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!