JaviSoto/JSBadgeView

How to remove the badge number after notifications are read.?

Closed this issue · 5 comments

Can you please help me out how to reset the badge count and remove the view.?
I have tried something like this, But it didn't worked out.
badgeView.badgeText = @""; or badgeView.badgeText = @"0"

badgeView.hidden = YES;
deanq commented

This doesn't work.

What doesn't work? Would you mind elaborating on the behavior you're seeing?

deanq commented

Never mind. I was previously just using the initWithParentView convenience. The general use of this adds the badge view into the parent view, and if you are not referencing it properly, then you can't just "hide" it. I had to create a custom UIButton class (in my case) in order to reference the badgeView object, thus giving me control on updating it for later use.

+deanq can you post a short example on what you did?