0

グループ化された TableView のスタイルを設定する必要があります。このチュートリアルを見つけました: http://www.raywenderlich.com/2033/core-graphics-101-lines-rectangles-and-gradients。しかし残念ながら、単純なバージョン (赤) は私にはうまくいきません。私はARCを使用しているため、1行のコード

cell.backgroundView = [[[CustomCellBackground alloc] init] autorelease]; cell.selectedBackgroundView = [[[CustomCellBackground alloc] init] autorelease];

動作しません。上記のコードの ARC バージョンは何ですか。ストーリーボードでプロトタイプ セルを使用しています。多分それが理由です。

4

1 に答える 1

1

ARC は を使用しないautoreleaseので、次のように入力します。

cell.backgroundView = [[CustomCellBackground alloc] init];
cell.selectedBackgroundView = [[CustomCellBackground alloc] init];
于 2013-04-09T17:17:01.943 に答える