EXC_BAD_ACCESS on UIAlertview code=1

来源:互联网 发布:笑傲江湖知乎 编辑:程序博客网 时间:2024/05/29 04:00

UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"我的警告框" 

message:@"这是一个警告框" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定"nil];    


[alert show];


 出现这个问题的原因:otherButtonTitles:@"确定"之后少写了nil

0 0