1
단추가있는 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.
시간 내 주셔서 감사합니다.하지만 여전히 문제를 분류하지는 않았습니다. 이것이 내가 본 것입니다 http://tinypic.com/view.php?pic=wa2ijq&s=6 –
@ JeevanThandi 그러면 정확히 무엇이 문제입니까? 위에서 언급 한 것은 "buttonIndex"의 철자를 수정 한 고정 값이없는 선언되지 않은 식별자 오류입니다. –
http://tinypic.com/view.php?pic=28qvhom&s=6 –