Closed StephenZhuang closed 10 years ago
Hi Stephen,
Sorry for the delay. The problem can be solved by calling [self setNeedsDisplay];
on the tab bar item after the change. Something like this:
- (void)setBadgeValue:(NSString *)badgeValue {
_badgeValue = badgeValue;
[self setNeedsDisplay];
}
I'll add this fix in the next version of RDVTabBarController.
@robbdimitrov Hi rob,thanks for reply. The solution above seems that does't work correctly. I select tab1 and post a notification as above, and in tab2 I observe the notification. if I don't select tab2, the badge of tab2 will not change or appear.
@StephenZhuang Hi Stephen, I've managed to inspect and fix the problem. I was setting parentViewController
to nil when hiding a view controller. This resulted in a bug where rdv_tabBarController
on a hidden controller returned nil
value. The problem has been fixed in commit eb74eafcf609c753704cf60c67e43d9869fea4ea.
I add a notification like this, - (void)refreshNum:(NSNotification *)notification,this method works , but the badge does't change;