setBadgeImage(_:label:forBadgeIdentifier:)
Sets the badge image and label for the given ID.
Declaration
func setBadgeImage(_ image: NSImage, label: String?, forBadgeIdentifier badgeID: String)Parameters
- image:
An Nsimage object. The system may or may not draw this image on top of the item’s icon; when it does, the system determines the overlay position. Don’t add any padding to the image to adjust this positioning. The image draws at up to 320 x 320 points.
- label:
A label describing the sync state represented by this badge. Each label should be a short localized string, such as “Waiting.”
- badgeID:
A unique ID, identifying this badge.
Discussion
Use this method to configure your badges. Finder may display the image, the label or both. Your Finder Sync extension typically sets up a fixed number of badges during its init method.