I am using the following code to call a function when somebody clicks on a button within a UITableViewCell. Unfortunately the code still gets called even when the touch is released outside of the button area. (e.g touch the button, slide finger off button and button is still actioned).
Can somebody please tell me why this happens, or what the correct way of doing this is? I thought that perhaps my problem was with the "addTarget" clause - i.e perhaps the TouchUpInside is referring to my UITableView rather than the button itself??
[cellPeriod.myButton1 addTarget:self action:@selector(buttonClickedStopWatch:) forControlEvents:UIControlEventTouchUpInside];