Merge pull request #87 from DanielMandea/kvcRemoveObserverCrash

Fixed KVC remove observer crash for XLTwitterPagerTabStripViewController
This commit is contained in:
Martin Barreto 2015-12-28 16:16:57 -03:00
commit 8fccf50c83
1 changed files with 5 additions and 1 deletions

View File

@ -174,7 +174,11 @@
-(void)dealloc
{
[self.navigationView removeObserver:self forKeyPath:@"frame"];
// Perform a try catch when removing a observer in case it was never registered
@try {
[self.navigationView removeObserver:self forKeyPath:@"frame"];
}
@catch (NSException * __unused exception) {}
}