ハロの外部記憶インターフェイス

そろそろ覚える努力が必要かも…

propertyを設定する

ヘッダーファイル

OutLetとして使う変数をproperty設定する。

@interface ....{
    UIButton myButton;
}
@property (nonatomic, retain) IBOutlet UIButton *myButton;

メインファイル

ヘッダーで設定したpropertyのGetter,Setterの生成

@synthesize myButton;

- (void)dealloc {
    [myButton release];
    [super dealloc];
}
  1. [myButton release];:変数のメモリ解放コードも実装