iOS 7 で UITextField を使用した UIAlertView が機能しません。修正方法は?
スクリーンショットは次のとおりです。
これが私のコードです:
iOS7 の UIAlertView で UITextFeield を取得するにはどうすればよいですか?
-(void)takeUserName
{
mChangePlayerAlert = [[UIAlertView alloc] init];
mChangePlayerAlert.title = title;
mChangePlayerAlert.message = @"\n";
mChangePlayerAlert.delegate = self;
[mChangePlayerAlert addButtonWithTitle:@"Save"];
[mChangePlayerAlert addButtonWithTitle:@"Cancel"];
CGRect frame;
frame = CGRectMake(20, 45, 245, 27);//(200, 500, 400, 120);
mTextFeild = [[UITextField alloc] initWithFrame:frame];
mTextFeild.textColor = [UIColor blueColor];
mTextFeild.borderStyle = UITextBorderStyleRoundedRect;
mTextFeild.keyboardType = inType;//;
mTextFeild.returnKeyType = UIReturnKeyDone;
mTextFeild.autocorrectionType = UITextAutocorrectionTypeNo;
mTextFeild.autocapitalizationType = UITextAutocapitalizationTypeNone;
mTextFeild.delegate = self;
[mChangePlayerAlert addSubview:mTextFeild];
mTextFeild.delegate = self;
[mTextFeild becomeFirstResponder];
[mChangePlayerAlert show];
}