Badge on top of right navigation button

938 Views Asked by At

I have a requirement where I need to show the badge number on top of the right navigation button. Something like this:

enter image description here

How to show the badge on top of UIBarButtonItem in the navigation bar?

I am still using Xcode 7.3.1, Swift 2.2.

1

There are 1 best solutions below

3
derdida On BEST ANSWER

I am working with this Framework here:

https://github.com/enmiller/ENMBadgedBarButtonItem-Swift

Otherwise you could create your own View with a Badge. Just make an Custom UINavigationItem.

For example:

let rightBarButton = UIBarButtonItem(customView: AnyOfYourCustomViews)