I had a UIAlertView window which worked fine in iPhone OS 3.2.3, with SDK 3.1.3 and XCode 3.2.1.
But after I updated the iPhone to OS 4.0 by iTunes, consequently had to upgrade the SDK to 4.0 (with XCode 3.2.3), the UIAlertView window turns out too high when popping up, and only drops down to the correct position after the textField is tapped with the keyboard pops out.
Please see the screenshots below:
As I do not have 10 reputations to post images here, please refer to http://www.iphonedevsdk.com/forum/iphone-sdk-development/51160-alertview-too-high-os4.html#post214228 for the screenshots. Sorry for this.
The relevant code is below:
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];
Could you guys shed some lights please? Thanks a lot!