【问题标题】:On AlertView App Crash in iOS7关于 iOS7 中的 AlertView App Crash
【发布时间】:2015-09-21 00:41:12
【问题描述】:

在 iOS7 中。我正在显示UIAlertView,然后我们收到通知,其中也显示UIAlertView。单击UIAlertView 我的应用程序在iOS7 中崩溃。

打印日志

-[AddNotification respondsToSelector:]: message sent to deallocated instance 0x14b53e00

【问题讨论】:

  • 显示您的总和代码
  • 你能分享你的代码和错误堆栈跟踪吗?
  • 可能你已将委托设置为 YES 并且未实现 alertview 的委托方法。
  • 你需要对alertView的按钮点击进行任何操作吗?
  • 然后在初始化alertView时设置delegate:nil。希望这行得通。

标签: ios objective-c iphone


【解决方案1】:

这意味着您的内存已被释放,如果您在该特定 VC 上使用了任何委托方法,请删除委托选项,请执行此操作

 - (void)dealloc
{

for example if you are used any tableview or else ...

//if you have any table views these would also need to be set to nil
self.tableView.delegate = nil;
self.tableView.dataSource = nil;
}

选项 2

启用Instruments 请参考this

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多