gpt4 book ai didi

iphone - Alertview中的Exc_Bad_Access显示

转载 作者:行者123 更新时间:2023-12-03 16:01:26 25 4
gpt4 key购买 nike

在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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com