我有一个UIAlertView窗口,它在iphoneos3.2.3中运行良好,sdk3.1.3和xcode3.2.1。
但在我用iTunes将iPhone升级到OS4.0之后,不得不将SDK升级到4.0(使用Xcode3.2.3),UIAlertView窗口在弹出时显示得太高,只有在键盘弹出时点击文本字段后才会下降到正确的位置。
请看下面的截图:
由于我没有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];
你们能给我点灯光吗?谢谢!