【发布时间】:2011-12-09 12:23:27
【问题描述】:
我已使用以下建议的例程来更改表格视图单元格中的详细信息披露按钮图像(在 tableView cellForRowAtIndexPath 中)
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
UIButton *myAccessoryButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 24, 24)];
[myAccessoryButton setBackgroundColor:[UIColor clearColor]];
[myAccessoryButton setImage:[UIImage imageNamed:@"ball"] forState:UIControlStateNormal];
[cell setAccessoryView:myAccessoryButton];
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
}
但是,现在不再在单击按钮时调用事件 tableView accessoryButtonTappedForRowWithIndexPath。
有人知道为什么吗?
【问题讨论】:
标签: xcode uitableview ios5