0

When I set the badge value, it's red background with white font.

Is it possible to change the background color of the badge to eg. blue?

Vivek Kalkur
  • 2,200
  • 2
  • 21
  • 40
MojoDK
  • 4,410
  • 10
  • 42
  • 80

1 Answers1

1

I had to do this recently and there isn't a built-in way.

But really, it's not that hard to write your own:

  • Have a graphic designer make you 3 images: left side, right side, and a 1 pixel wide image you can stretch for larger numbers
  • Make a new control and inherit from UIView
  • Use a UILabel and three UIImageViews for each picture

The only slightly difficult part is going to be measuring the length of the text for centering.

Rolling your own let's you make it exactly how you need. I exposed a int? Value property that made extremely easy to use from within my apps as well as a ValueChanged event.

jonathanpeppers
  • 26,115
  • 21
  • 99
  • 182