mirror of
https://github.com/zhigang1992/ZGParallelView.git
synced 2026-03-26 06:45:15 +08:00
Quick fix for [Observing Issue](https://twitter.com/omarojo/status/293402948682252289)
This commit is contained in:
@@ -89,7 +89,12 @@ static char UITableViewZGParallelViewIsObserving;
|
||||
|
||||
- (void)setIsObserving:(BOOL)isObserving {
|
||||
if (self.isObserving == YES && isObserving == NO) {
|
||||
[self removeObserver:self forKeyPath:@"contentOffset"];
|
||||
@try {
|
||||
[self removeObserver:self forKeyPath:@"contentOffset"];
|
||||
}
|
||||
@catch (NSException *exception) {
|
||||
//It's not observing
|
||||
}
|
||||
}
|
||||
|
||||
[self willChangeValueForKey:@"isObserving"];
|
||||
|
||||
Reference in New Issue
Block a user