コードでメソッド(関数?)を呼び出そうとしています。私の .h ファイルには次のものがあります。
- (void)changeColour;
私の .m ファイルには次のものがあります。
- (IBAction)leftSwipeDetected:(UISwipeGestureRecognizer *)sender {
[self changeColour];
}
- (void)changeColour
{
colourCount++;
switch (colourCount)
{
case 1:
self.view.backgroundColor = [UIColor redColor];
break;
case 2:
self.view.backgroundColor = [UIColor blueColor];
break;
}
}
これは、プログラムを実行すると SIGABRT の放棄を促しますが、メソッドを呼び出そうとしなかったときはそうではありませんでした。これに問題はありますか?
ありがとう。