Tag: uialertview exc

iOS6中UIAlertView的EXC_BAD_ACCESS代码2

我想弄清楚为什么即时通讯崩溃在我的应用程序。 它在ios5.1模拟器中运行的Xcode 4.4中工作得很好,但是当我切换到xcode 4.5和ios6时,我得到了一个EXC_BAD_ACCESS代码2.这是我的代码: – (void) myMethod { UIAlertView *alertview = [[[UIAlertView alloc]initWithTitle:@"Title" message:@"message" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil] autorelease]; alertview.tag = 1 [alertview show]; } 这是给我一个EXC_BAD_ACCESS代码2在[UIAlertView show]行 有任何想法吗? 谢谢!