【发布时间】:2014-10-17 16:23:28
【问题描述】:
- (void)setTableView:(UITableView *)tableView {
_tableView = tableView;
[_tableView addObserver:self
forKeyPath:@"frame"
options:0
context:nil];
[self updateFrame];
}
exc_bad_access 在尝试添加观察者时发生。
在汇编代码中,错误代码是'NSKeyValueObserverRegistrationLock'。
不知道是什么导致了错误。
我正在运行 XCTest,因此错误可能是由于将测试代码注入应用程序代码而导致的。
有人帮忙吗?
【问题讨论】:
标签: ios deadlock exc-bad-access key-value-observing xctest