diff --git a/Classes/TableUtils/IMYAOPTableViewUtils.m b/Classes/TableUtils/IMYAOPTableViewUtils.m index c0180ad..dfc137f 100644 --- a/Classes/TableUtils/IMYAOPTableViewUtils.m +++ b/Classes/TableUtils/IMYAOPTableViewUtils.m @@ -118,9 +118,11 @@ - (void)bindingTableView:(UITableView *)tableView aopClass:(Class)aopClass for (id observance in observanceArray) { NSString *keyPath = [observance valueForKeyPath:@"_property._keyPath"]; id observer = [observance valueForKey:@"_observer"]; + id context = nil; if (observer && keyPath) { NSKeyValueObservingOptions options = 0; @try { + context = [observance valueForKey:@"_context"]; options = [[observance valueForKey:@"_options"] unsignedIntegerValue]; } @catch (NSException *exception) { IMYLog(@"%@", exception.debugDescription); @@ -128,7 +130,7 @@ - (void)bindingTableView:(UITableView *)tableView aopClass:(Class)aopClass if (options == 0) { options = (NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew); } - [tableView addObserver:observer forKeyPath:keyPath options:options context:nil]; + [tableView addObserver:observer forKeyPath:keyPath options:options context:(void *)context]; } } }