我的uialeartview代码。当它以横向或纵向显示时可以,但是当将纵向更改为横向或将横向更改为纵向时
它总是会向上移动,而不是像以前那样在窗口的中心
旋转时如何使它成为窗口的中心。
UIAlertView *over;
over=[[UIAlertView alloc]initWithTitle:@"Game over"
message:[NSString stringWithFormat:@"Your score : %d\n\n\n",score]
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[over show];
UITextField *nameinputfiled=[[UITextField alloc]initWithFrame:CGRectMake(11, 80, over.frame.size.width-50, 31)];
nameinputfiled.backgroundColor=[UIColor whiteColor];
[over addSubview:nameinputfiled];
[over release];