I currently have a button defined in a cell, and a way to track its UITouchDown action, as shown:
- (void) clickedCallSign:(id)sender { int index = [sender tag]; NSLog(@"event triggered %@",index); } - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
However, when I click on a cell in the simulator, the console debug message is βevent triggered (null)β, and soon my application will work.
How can I get indexPath.row correctly in my clickedCallSign method?
objective-c iphone uitableview uibutton selector
unicornherder
source share