Interface NSFileProviderItemDecorating

  • All Superinterfaces:
    NSFileProviderItem

    public interface NSFileProviderItemDecorating
    extends NSFileProviderItem
    Decorations are defined in the extension's Info.plist by adding a NSFileProviderDecorations key with one or many entries to the NSExtension dictionary. NSFileProviderDecorations Identifier $(PRODUCT_BUNDLE_IDENTIFIER).hasComments BadgeImageType com.someone.item.decoration.unreadCommentIcon Category Badge LocalizedTitle NSStringFormat %@ unread comments NSStringFormatValues item.userInfo.unreadCommentCount The keys for each entry are defined as follows: Key | Property ---------------|---------- Identifier | The identifier used to refer to this decoration in the item definition (as type `NSFileProviderItemDecorationIdentifier`). BadgeImageType | The overlay UTI (see below) Label | A localizable title, to be used in detail views, on mouse over and for voice over Category | The position of the decoration: one of 'Badge', 'Sharing', or 'FolderBadge' At rendering time, the icon for the UTI specified by 'BadgeImageType' will be looked up. The UTI must conform to 'com.apple.icon-decoration.badge'. Decorations from different categories are presented in different places in the UI. Note that regardless of the dictionary key used for the visual decoration, the Label key will be used for mouse over / voice over. Category | Location -------------|---------- Badge | On top of the icon. The decoration is an image, taken from the BadgeImageType key. Only the first badge is displayed. Sharing | Adjacent to the icon. The decoration is a string, taken from the Label key. Only the first label is displayed. FolderBadge | Embossed on top of the folder icon. The image from the BadgeImageType key will be embossed. Only the first badge is displayed. Only valid for folders. API-Since: 16.0
    • Method Detail

      • decorations

        @Nullable
        @Nullable NSArray<java.lang.String> decorations()
        Returns an array of decorations for the item. To adopt this protocol, implement the -decorations method on your NSFileProviderItem to return valid decoration identifiers from your Info.plist.