-1
我有一个UITableView,我得到一个UUIabel和一个UIButton customUITableViewCell,我想更改特定行的标签文本值按下按钮,在同一行。请帮我之后,我在iPhone很新。如何更改自定义UITableViewCell中的按钮后按标签文本
我有一个UITableView,我得到一个UUIabel和一个UIButton customUITableViewCell,我想更改特定行的标签文本值按下按钮,在同一行。请帮我之后,我在iPhone很新。如何更改自定义UITableViewCell中的按钮后按标签文本
请检查您是否映射动作来回您的按钮,并继续与这个..
-(void)yourButtonClicked:(id)sender {
CustomCell *clickedCell = [[sender superView]superView];
NSindexPath *indexPath = [YourTableViewObject indexPathForCell:clickedCell];
NSLog(@"%d %d",indexPath.section,indexPath.row);
}
这里你得到行为您点击的单元格。
Th你可以很容易地改变你的标签文本..通过
clickedCell.yourLabel.text = @"Your string";