how to handle button onclick action in iPhone without using interface builder?
views:
488answers:
1
+3
A:
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
}
EEE
2010-03-04 07:50:43
hi..i've aded addTarget functionality in my code. but stil on click of button , nothing is happening. no action is done.
suse
2010-03-11 05:12:23
did you implement the action? See edit.
EEE
2010-03-11 06:41:36