내 앱에 경고 메시지가 필요하고 예 버튼을 클릭하면 마지막 작업을 결정하는 다른 경고 메시지를 클릭합니다. - (void) alertView : (UIAlertView *) alertView didDismissWithButtonIndex : (NSInteger) buttonIndex 이 메서드는 사용하고 있습니다.UIAlert보기 용 예/아니오 조건
도와주세요.
내 앱에 경고 메시지가 필요하고 예 버튼을 클릭하면 마지막 작업을 결정하는 다른 경고 메시지를 클릭합니다. - (void) alertView : (UIAlertView *) alertView didDismissWithButtonIndex : (NSInteger) buttonIndex 이 메서드는 사용하고 있습니다.UIAlert보기 용 예/아니오 조건
도와주세요.
확인이 밖으로 http://www.timeister.com/2010/06/objc-show-alert-iphone/
// open a alert with an OK and cancel button
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"UIAlertView"
message:@"My message" delegate:self cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", nil];
[alert show];
[alert release];
수행 경고를 표시하기 전에 - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
가 호출 alert.tag = 1;
다음합니까 무엇 @Adrian Pirvulescu가 말했지만 : 당신이 필요로하는
if (alertView.tag == 1) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"2nd Alert"
message:@"My message" delegate:self cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", nil];
alert.tag = 2;
[alert show];
[alert release];
}
else if (alertView.tag == 2) {
[self CallSomeMethod];
}
else {
//do what ever you want here
}
도움이 어떤 종류의 할 ? –
Thaks Marcelo Cantos.I 두 개의 경고 메시지가 필요하지만 첫 번째 메시지가 예이면 2 번째 메시지이고 두 번째 메시지가 예인 경우 메서드 호출을 원합니다. alert.tag == 1을 사용했지만 작동하지 않습니다. 내 코드를 볼 수 있습니다. 포럼에 게시되었습니다. 도와 주시면 도와 드리겠습니다. 감사합니다. – 1988