Это сообщит вам, когда значение этого поля изменится:
UITabBar *myTabBar = [[UITabBar alloc] init];
[self addObserver:myInterestedObjectWhoWantsToKnowWhenTabBarHiddenChanges
forKeyPath:@"myTabBar.hidesBottomBarWhenPushed"
options:NSKeyValueObservingOptionNew
context:nil];
Затем в myInterestedObjectWhoWantsToKnowWhenTabBarHiddenChanges.m внедрить
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context {
if ([keyPath isEqualToString:@"myTabBar.hidesBottomBarWhenPushed"]) { // this key must match, where observer is set.
// object will be "self" from the code above
// and the change dictionary will have the old and new values.
}
}