とりあえず、「iPhone SDK プログラミング大全」
でお勉強。
P.157で
cell.text = [names objectAtIndex:indexPath.row];
で、text is deprecated.となっている。
デベロッパドキュメントを見ると
The text of the cell. (Deprecated. Use the textLabel and detailTextLabel properties instead.)
になっているので、
cell.textをcell.textLabel
にしてみると、read-onlyだ、と怒られた。
http://hanagurotanuki.blogspot.com/2009/07/softbank-creative-iphone-iphone-sdk-3.html
をみて、
cell.textLabel.text
にすればいいことがわかった。
0 件のコメント:
コメントを投稿