ボタン付きのUIAlertViewがあり、これらのボタンにアクションを実行させようとしています。問題は、メソッドに「宣言されていない識別子」があることです。
私が見た問題http://tinypic.com/view.php?pic=28qvhom&s=6
コード
アラートビュー
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Well done!"
message: @"You got all 20 in Time: x"
delegate:nil
cancelButtonTitle:nil
otherButtonTitles:@"Save and Quit", @"Quit", nil];
[alert show];}
ボイド
-(void)alertView:(UIAlertView* )alertView
clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex==0) {/*some action */ }
else if(butonIndex==1){/*some action */}
}
//I aso have <UIAlertViewDelegate> in my .h file.