如果单击该按钮但卡住了,我正在尝试更改动态单元格中按钮的标题:
我有:
- (IBAction)buttonWasPressed:(id)sender
{
static NSString *CellIdentifier = @"Cell";
NSIndexPath *indexPath =
[self.tableView
indexPathForCell:(UITableViewCell *)[[sender superview] superview]];
NSUInteger row = indexPath.row;
NSLog(@"row::%d",row);
ResultsCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier cellForRowAtIndexPath:indexPath];
[cell.favoriteButton setTitle:@"favorited" forState:UIControlStateNormal];
}
它适用于我NSLog(@"row::%d",row);
,但我不确定如何正确处理第二部分?有什么建议么?