我在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