我在UITableViewCell
里面创建了一个按钮,当我点击一个按钮时,我想用作索引值的作者视图控件。uitableview触摸事件
tapped = [UIButton buttonWithType:UIButtonTypeCustom];
[tapped setFrame:CGRectMake(0, 0, 320, 100)];
[tapped setTitle:@"button" forState:UIControlStateNormal];
NSInteger tet;
tet = indexPath.row;
[tapped addTarget:self action:@selector(tapped:) forControlEvents: UIControlEventTouchDown];
[Cell addSubview:tapped];
[其中的UIButton在一个UITableView压制检测]可能重复( http://stackoverflow.com/questions/1802707/detecting-which-uibutton-was-pressed-in-a-uitableview) – Vladimir