我已经使用以下建议的例程来更改表视图单元格中的详细信息公开按钮图像(在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;
}
Run Code Online (Sandbox Code Playgroud)
但是,tableView accessoryButtonTappedForRowWithIndexPath
现在不再单击按钮调用该事件.
谁有任何想法为什么?