私はiPhone Devを学んでいます。私の簡単な電卓プログラムを書くんだけど、私は、私はすべてのオプションを得ることはありませんInterface Builderで、ファイルの所有者に電卓のボタンのいずれかを接続しようとすると:UIButtonをXCode4のViewControllerに接続できません
.hファイル
@interface CalculatorViewController : UIViewController
{
CalculatorBrain *brain;
IBOutlet UILabel *label;
}
- (IBAction)digitPressed:(UIButton *)sender;
- (IBAction)operandPressed:(UIButton *)sender;
@end
.mファイル
#import "CalculatorViewController.h"
@implementation CalculatorViewController
- (IBAction)digitPressed:(UIButton *)sender
{
//not implemented yet
}
- (IBAction)operandPressed:(UIButton *)sender
{
//not implemented yet
}
@end
は、私の知る限りは、インターフェイスビルダーで私CalculatorViewController.xibで働いているとき、私は、ファイルの所有者にボタンを接続しようと、私は理解して、私は2つのオプションがありますする必要があります 1. をdigitPressed 2.オペランド押された
しかし、私はオプションがありません。私が間違っていることは何ですか?
ありがとうございました。
変更してみてください '(UIButton *)sender'にちょうど'(ID)が – Eimantas