我需要为分组的 TableView 设置样式。我找到了这个教程:http ://www.raywenderlich.com/2033/core-graphics-101-lines-rectangles-and-gradients 。但不幸的是,简单版本(红色)对我不起作用。我正在使用 ARC,因此只有一行代码
cell.backgroundView = [[[CustomCellBackground alloc] init] autorelease];
cell.selectedBackgroundView = [[[CustomCellBackground alloc] init] autorelease];
不起作用。上面代码的 ARC 版本是什么。我在情节提要中使用原型单元。也许这就是它的原因。