我想弄清楚为什么我在我的应用程序中遇到此崩溃.
它在使用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];
}
Run Code Online (Sandbox Code Playgroud)
这是给我一个EXC_BAD_ACCESS码2上[UIAlertView show]线
有任何想法吗?
谢谢!
我最近向App Store提交了一个尚未被接受的应用程序.同时,我下载了Xcode 4.5并在iPhone 6.0模拟器中测试了我的应用程序.
然而,当我打算显示的UIAlertView,该应用程序崩溃,在[myAlertView show]与线EXC_BAD_ACCESS错误.它适用于iPhone 5.1模拟器.
这是我的代码:
UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Warning" message:@"Are you sure?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[myAlertView show];
Run Code Online (Sandbox Code Playgroud)
这是正常的吗?我的代码怎么办?
另外,您认为我应该将我的应用程序重新发送给Apple吗?(只是询问您的建议)
提前致谢.
编辑:由于iOS 6崩溃,Apple拒绝了该应用.