だから私はこれを行うのに問題があります。このコードは、私が望むようには機能しません。
if (answer.text == @"text") {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"title" message:@"message" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert show];
[alert release];
}else{
UIAlertView *alert1 = [[UIAlertView alloc] initWithTitle:@"title 2" message:@"Title 2" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alert1 show];
[alert1 release];
}
私の問題は、テキストボックスの「回答」にテキスト「テキスト」が含まれていることです。最初のUIAlertViewを実行しません。それは常に else{} の 1 つを行います。このコードは、ボタンの IBAction にも含まれています。今はどんな助けでもいいです。