你好使用未聲明的標識符試圖改變我現有的按鈕,背景圖像我得到這個錯誤時的按鈕圖像
Use of undeclared identifier 't1Btn'
我使用我的.m文件中的代碼是
@synthesize t1Btn;
- (IBAction)t2Btn:(id)sender {
UIImage *greenOut = [UIImage imageNamed:@"Green out button.png"];
[t1Btn setBackgroundImage:greenOut forState:UIControlStateNormal];
}
我.h文件中的代碼是
@interface GroupView : UIViewController <ZBarReaderDelegate>
{
IBOutlet UIButton *t1Btn;
}
@property (nonatomic, retain)IBOutlet UIButton *t1Btn;
- (IBAction)t1Btn:(id)sender;
我還在學習對象 - 很抱歉,如果這是一個壞的問題,但我有三編輯尋找答案,我似乎不能找到任何東西。我敢肯定,它只是一些簡單的我失蹤
因此,任何幫助將是巨大的感謝:)
擺脫'@ synthesize'的。擺脫明確的伊娃。然後將該調用更改爲'[self.t1Btn setBackgroundImage ...]'。 – rmaddy