Inherits from NSObject
Declared in CNUserNotificationFeature.h

Overview

CNUserNotificationFeature is the real extension for the user notifications. It holds additional features that gives you more flexibility using notifications.

Tasks

Properties

bannerImage

Specifies an alternate notification banner image.

@property (strong) NSImage *bannerImage

Discussion

If you don’t set an own value for this property, the default will be set to the current application icon.

Declared In

CNUserNotificationFeature.h

dismissDelayTime

Property that specifies the banner dismiss delay time.

@property (assign) NSTimeInterval dismissDelayTime

Declared In

CNUserNotificationFeature.h

lineBreakMode

Specifies the NSLineBreakMode for the [CNUserNotification informativeText].

@property (assign) NSLineBreakMode lineBreakMode

Discussion

The value of this property specifies the appearance of the notification banner. All truncating values such as NSLineBreakByTruncatingHead, NSLineBreakByTruncatingMiddle, NSLineBreakByTruncatingTail and the NSLineBreakByClipping will present the [CNUserNotification informativeText] in single line mode.

NSLineBreakByWordWrapping and NSLineBreakByCharWrapping instead shows the informativeText in multiple lines and the notification banner height may grow.

Use one of these constants from the AppKit.framework:

enum {
    NSLineBreakByWordWrapping = 0,      // Wrap at word boundaries, default
    NSLineBreakByCharWrapping,          // Wrap at character boundaries
    NSLineBreakByClipping,              // Simply clip
    NSLineBreakByTruncatingHead,        // Truncate at head of line: "...wxyz"
    NSLineBreakByTruncatingTail,        // Truncate at tail of line: "abcd..."
    NSLineBreakByTruncatingMiddle       // Truncate middle of line:  "ab...yz"
};
typedef NSUInteger NSLineBreakMode;

Declared In

CNUserNotificationFeature.h