何かが欠けているようですが、以下のコードは と の両方の値を生成しnil
ています (正しいアラート タイプを正しく起動し、警告やエラーを示していません)。のこの実装の問題は何でしょうか?title
title1
UIAlertView
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"High Score" message:(NSString *)scoreMessage delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
alert.alertViewStyle= UIAlertViewStylePlainTextInput;
UITextField *title1 = [alert textFieldAtIndex:0];
[alert show];
title1= [alert textFieldAtIndex:0];
NSString *title = title1.text;
NSLog(@"The name is %@",title);
NSLog(@"Using the Textfield: %@",[[alert textFieldAtIndex:0] text]);