Objective c 如何在中心显示UIAlertView

Objective c 如何在中心显示UIAlertView,objective-c,ios7,uialertview,Objective C,Ios7,Uialertview,在我看来,我面临着麻烦。在iOS6中工作正常,但在iOS7中工作正常 有时它出现在屏幕中央,有时出现在左侧。 有没有关于如何修复的建议?还是苹果虫?因为我正在使用 本机UIAlertView initWithTitle方法 这是密码 infoAlert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"Ok" otherButtonTi

在我看来,我面临着麻烦。在iOS6中工作正常,但在iOS7中工作正常 有时它出现在屏幕中央,有时出现在左侧。 有没有关于如何修复的建议?还是苹果虫?因为我正在使用 本机UIAlertView initWithTitle方法

这是密码

infoAlert = [[UIAlertView alloc] initWithTitle:title 
      message:message delegate:nil 
      cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];

能否添加与此问题相关的代码这里是代码infoAlert=[[UIAlertView alloc]initWithTitle:title消息:消息委托:nil CancelButtontTitle:@“确定”其他ButtontTitles:nil,nil];问题解决了。发布我调用infoAlert 2到3次的内容,但没有忽略它以前的实例。现在在调用infoAlert之前,我正在检查它是否已经存在。如果是,我调用此[infoAlert dismissWithClickedButtonIndex:0动画:是];然后调用[infoAlert show]。