创建简单 UIAlertView 时的 EXC_BAD_ACCESS
在使用以下代码声明一个简单的 UIAlertView 时,我在该行收到上述错误:
UIAlertView * alerteken = [[UIAlertView alloc] initWithTitle:@"Email" message:@"Please enter the @mailinator.com email address you want to read:" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok"];
我做错了什么?
While declaring a simple UIAlertView, with the following code, I get the above mentionned error on that line:
UIAlertView * alerteken = [[UIAlertView alloc] initWithTitle:@"Email" message:@"Please enter the @mailinator.com email address you want to read:" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok"];
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要提供最后以“nil”结尾的按钮标题列表:
You need to provide a list of button titles terminated with a "nil" at the end: