-2
@interface ViewController()
@property (weak, nonatomic) IBOutlet UILabel *rollButtonClicked;
-(IBaction)rollButtonClicked:(id)sender
{
int roll = [self.model getDiceRoll];
int roll2 = [self.model getDiceRoll];
[self.firstDieView showDie:roll];
[self.secondDieView showDieroll2];
NSString *sumText = [NSString stringWithFromat:@"Sum is %d", roll + roll2];
self.sumLabel.text = sumText;
}
我不斷收到錯誤,如果我後放置一個分號 - (IBAction爲)rollButtonClicked:(ID)發送者,我會得到「(」如果我刪除它的Xcode會告訴我的問題,因爲它說我需要一個分號後 - (IBAction爲)rollButtonClicked:(ID)發送的Objective-C簡單的錯誤代碼「(」
,你可以看到我還是很新的對象-C請幫忙
謝謝提前