美文网首页
iOS : libc++abi.dylib: terminate

iOS : libc++abi.dylib: terminate

作者: Timer丶 | 来源:发表于2018-02-06 09:19 被阅读23次

程序运行时,莫名其妙崩溃,打断点也没效果......

libc++abi.dylib: terminate_handler unexpectedly threw an exception报这个错误的原因有很多,我的原因是使用KVO之后,没有移除观察者!

[self.webView addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionNew context:nil];

在dealloc中一定要移除观察者!!!!

- (void)dealloc{

    [self.webView removeObserver:self forKeyPath:@"estimatedProgress"];

}

相关文章

网友评论

      本文标题:iOS : libc++abi.dylib: terminate

      本文链接:https://www.haomeiwen.com/subject/fywwzxtx.html