<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBarButtonItemBadge",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIBarButtonItemBadge"
  },
  "title" : "UIBarButtonItemBadge"
}
-->

# UIBarButtonItemBadge

A badge to be rendered on a bar button item.

```
@interface UIBarButtonItemBadge : NSObject
```

## Topics

### Instance Properties

[`@property (nonatomic, strong, nullable) UIColor * backgroundColor;`](/documentation/UIKit/UIBarButtonItemBadge/backgroundColor)

The badge’s background color. A `nil` value will be treated as an indication to use the system default.

[`@property (nonatomic, strong, nullable) UIFont * font;`](/documentation/UIKit/UIBarButtonItemBadge/font)

The font to use for the badge. A `nil` value will be treated as an indication to use the system default.

[`@property (nonatomic, strong, nullable) UIColor * foregroundColor;`](/documentation/UIKit/UIBarButtonItemBadge/foregroundColor)

The badge’s foreground color. A `nil` value will be treated as an indication to use the system default.

[`@property (nonatomic, copy, readonly, nullable) NSString * stringValue;`](/documentation/UIKit/UIBarButtonItemBadge/stringValue)

### Instance Methods

[`- (instancetype) init;`](/documentation/UIKit/UIBarButtonItemBadge/init)

### Type Methods

[`+ (instancetype) badgeWithCount:(NSUInteger) count;`](/documentation/UIKit/UIBarButtonItemBadge/badgeWithCount:)

Creates a badge with the specified `count`.

[`+ (instancetype) badgeWithString:(NSString *) stringValue;`](/documentation/UIKit/UIBarButtonItemBadge/badgeWithString:)

Creates a badge with the specified `string`.

[`+ (instancetype) indicatorBadge;`](/documentation/UIKit/UIBarButtonItemBadge/indicatorBadge)

Creates a badge that’s empty, and just renders the badge background
with no content.

## Relationships

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSCopying`](/documentation/Foundation/NSCopying)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)