我和我的同学试图学习如何将代码与按钮和标签联系起来。但它一直说“不完整的实现”错误。
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
-(IBAction) btClickMe:(id)sender {
lbTitle.text = @"Hello!";
}
-(IBAction) btWelcome:(id)sender{
lbTitle.text = @"Welcome";
}
-(IBAction) btGo:(id)sender{
lbTitle.text = txtName.text;
}
-(IBAction) btTryMe:(id)sender{
if (x == 0) {
lbTitle.text = @"Bye! Bye!";
x = 1;
} else {
lbTitle.text = @"Welcome!";
x = 0;
}
}