iPhone アプリにチャレンジ

昨日、うまく動かなくて悩んでいたのは、サンプルコードと比較してみたら、あっさり直った。

Listing 1-4に書かれているコードから

self.view = contentView;
[contentView release];

の位置をloadViewメソッドの最後に移動して実行するとうまく動いた。

iPhone Developer’s Cookbook, The: Building Applications with the iPhone SDK (Developer's Library)

iPhone Developer’s Cookbook, The: Building Applications with the iPhone SDK (Developer's Library)