I am using CustomCell in my tableView.With few buttons and labels. Now I want to give some actions in those buttons.Can anyone help me how can I use Action for my UIButton?
in the interface :
-(IBAction)btnAction;
in the implementation :
-(IBAction)btnAction
{
[self Evaluate:(int *)1 :(int *)2];
}
Now tell me how can I assign the action in a UIButton?I have UIButton in my cell.
You can programmatically add an action to the UIButton using the
addTarget:action:forControlEvents:method (a method of UIControl, of which UIButton is a subclass).So your implementation would look something like:
Hope this helps.