在UIAlertView显示消息中获取Exc_Bad_Access。
UIAlertView *systemAlert1 = [[UIAlertView alloc]initWithTitle:@"System message" message:@"note" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[systemAlert1 show]; **//Crashing on this line [EXC_BAD_ACCESS]**
[systemAlert1 release];
为什么我得到这个?请帮忙
最佳答案
任何UI内容,包括警报显示,都应在主线程上完成。
如果在其他线程上执行此操作,则肯定会崩溃。
关于iphone - Alertview中的Exc_Bad_Access显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13084014/