UIBarButtonItem-Badge icon indicating copy to clipboard operation
UIBarButtonItem-Badge copied to clipboard

if badgeValue is "0",badgeLabel still exist ! UIButton+badge

Open koalahl opened this issue 9 years ago • 0 comments

hi, the judgement of badgeValue in setBadgeVaule method is wrong!.

I sepearate it in two judgements: // When changing the badge value check if we need to remove the badge if (!badgeValue || [badgeValue isEqualToString:@""]) {

    [self removeBadge];
}else if ([badgeValue isEqualToString:@"0"]){// && self.shouldHideBadgeAtZero error。

    [self removeBadge];
}

or if (badgeValue || [badgeValue isEqualToString:@""] || [badgeValue isEqualToString:@"0"] &&self.shouldHideBadgeAtZero )

koalahl avatar Dec 24 '15 11:12 koalahl