- (void)setTableView:(UITableView *)tableView {
_tableView = tableView;
[_tableView addObserver:self
forKeyPath:@"frame"
options:0
context:nil];
[self updateFrame];
}
The exc_bad_access occurs when trying to add an observer.
In the assembly code, the error code is 'NSKeyValueObserverRegistrationLock'.
Have no idea what's causing the error.
I'm running XCTest so there might be a possibility that error was cause by injecting the test code into application code.
Anybody helps?