SDK 3.1.3 および XCode 3.2.1 を使用して、iPhone OS 3.2.3 で正常に動作する UIAlertView ウィンドウがありました。
しかし、iTunes で iPhone を OS 4.0 にアップデートした後、SDK を 4.0 (XCode 3.2.3 を使用) にアップグレードする必要があったため、ポップアップ時に UIAlertView ウィンドウが高すぎて、textField の後の正しい位置にしかドロップダウンしませんでした。キーボードが飛び出した状態でタップします。
以下のスクリーンショットをご覧ください。
ここに画像を投稿する 10 の評判がないので、スクリーンショットについてはhttp://www.iphonedevsdk.com/forum/iphone-sdk-development/51160-alertview-too-high-os4.html#post214228を参照してください。申し訳ありません。
関連するコードは次のとおりです。
wpName = [[UITextField alloc] initWithFrame:CGRectMake(12, 45, 260, 25)];
[wpName setBackgroundColor:[UIColor whiteColor]];
[wpName setPlaceholder:@"Your Name"];
[describeWP addSubview:wpName];
wpDescrip = [[UITextField alloc] initWithFrame:CGRectMake(12, 80, 260, 25)];
[wpDescrip setBackgroundColor:[UIColor whiteColor]];
[wpDescrip setContentVerticalAlignment:UIControlContentVerticalAlignmentCenter];
[wpDescrip setPlaceholder:@"Phone number, Company"];
[describeWP addSubview:wpDescrip];
CGAffineTransform moveUp = CGAffineTransformMakeTranslation(0, 90);
[describeWP setTransform:moveUp];
光を当ててもらえますか?どうもありがとう!