#import "CLSViewController.h"
@implementation CLSViewController
@synthesize statusText = _statusText;
- (void)viewDidUnload {
[self setStatusText:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (IBAction)buttonPressed:(UIButton *)sender {
NSString *title = [sender titleForState:UIControlStateNormal];
-> statusText.text = [NSString stringWithFormat:@"%@ button pressed.", title];
}
@end
statusText.text = ... という行
正しく合成できませんでしたか?を削除する= _statusText;
とエラーは解消されますが、何かに設定する必要があると思いました。