Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add border to the badge #19

Open
Souf-R opened this issue Feb 9, 2016 · 0 comments
Open

Add border to the badge #19

Souf-R opened this issue Feb 9, 2016 · 0 comments

Comments

@Souf-R
Copy link

Souf-R commented Feb 9, 2016

Hi,

I'm using this library and find it very simple and useful.
I want to add a border to my badge (border color and border width).
i modified method refreshBadge in the class UIBarButtonItem+Badge.m as follow:

// Handle badge display when its properties have been changed (color, font, ...)
- (void)refreshBadge
{
    // Change new attributes
    self.badge.textColor        = self.badgeTextColor;
    self.badge.backgroundColor  = self.badgeBGColor;
    self.badge.font             = self.badgeFont;
    self.badge.layer.borderColor= [UIColor whiteColor].CGColor;
    self.badge.layer.borderWidth= 1.5f;
    ....
}

So, I added these two lines:

    self.badge.layer.borderColor= [UIColor whiteColor].CGColor;
    self.badge.layer.borderWidth= 1.5f;

Please, could you add this in the library and make customizable.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant