Skip to content

Commit

Permalink
CYLTabBarController may crash when deallocating
Browse files Browse the repository at this point in the history
  • Loading branch information
QianNangong authored Oct 14, 2019
1 parent debf8bd commit 8492f62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CYLTabBarController/CYLTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ - (void)dealloc {
}
// KVO反注册
if (self.isObservingTabImageViewDefaultOffset) {
[self.tabBar removeObserver:self forKeyPath:@"tabImageViewDefaultOffset"];
@try {
[self.tabBar removeObserver:self forKeyPath:@"tabImageViewDefaultOffset"];
} @catch(NSException *e) { }
}
}

Expand Down

0 comments on commit 8492f62

Please sign in to comment.