アプリケーションに2つのセクションを持つグループ化されたテーブルビューがあります。1つ目は1つの行で構成され、2つ目は5つで構成されます。このようにセルにボタンを追加しました。
UIButton *newBtn=[UIButton buttonWithType:UIButtonTypeCustom];
[newBtn setFrame:CGRectMake(5,10,35,30)];
[newBtn setImage:[UIImage imageNamed:@"icon.png"] forState:UIControlStateNormal];
[newBtn addTarget:self action:@selector(selector:) forControlEvents:UIControlEventTouchUpInside];
newBtn.tag=4;
[cell.contentView addSubview:newBtn];
Now in that selector methode i need to change it with another image.I am trying to do that in this way
UITableViewCell *cell=(UITableViewCell *)[sender superview];
NSIndexPath *path=[self.mtableview indexPathForCell:cell];
「でも、ある時点でボトルネックになっています。誰かが私を正しい方向に向けることができますか?