CFUserNotification

From iPhone Development Wiki
Revision as of 06:59, 21 January 2014 by Zaersk (talk | contribs) (+ changing from second person to third person)
Jump to: navigation, search
CFUserNotification in action.

Although not part of the iPhone SDK, CFUserNotification does exist on the iPhoneOS. These notifications are shown on SpringBoard like standard alert views.

CFUserNotifications are sent to SpringBoard via the com.apple.SBUserNotification service, and a SBUserNotificationAlert will be shown. Because IPC is involved, one should use UIAlertView instead.

Dialog description keys

Unlike its Mac OS X counterpart, the iPhoneOS's user notification recognizes a different set of dialog description keys:

key string value comment
kCFUserNotificationTokenKey Token
kCFUserNotificationTimeoutKey Timeout Specify directly in the constructor instead.
SBUserNotificationHideButtonsInAwayView SBUserNotificationHideButtonsInAwayView
SBUserNotificationDontDismissOnUnlock SBUserNotificationDontDismissOnUnlock
kCFUserNotificationAlertTopMostKey AlertTopMost
SBUserNotificationDismissOnLock DismissOnLock
SBUserNotificationAllowMenuButtonDismissal SBUserNotificationAllowMenuButtonDismissal
SBUserNotificationOneButtonPerLine SBUserNotificationOneButtonPerLine
SBUserNotificationGroupsTextFields SBUserNotificationGroupsTextFields
SBUserNotificationDefaultButtonTag SBUserNotificationDefaultButtonTag
kCFUserNotificationKeyboardTypesKey KeyboardTypes
SBUserNotificationTextAutocapitalizationType SBUserNotificationTextAutocapitalizationType
SBUserNotificationTextAutocorrectionType SBUserNotificationTextAutocorrectionType
SBUserNotificationTextFieldButtonImagePath SBUserNotificationTextFieldButtonImagePath
SBUserNotificationTextFieldButtonDisplayDefaultButtonURL SBUserNotificationTextFieldButtonDisplayDefaultButtonURL
kCFUserNotificationSoundPathKey SoundPath Documented.
SBUserNotificationSoundAVControllerAttributesDictionaryKey SBUserNotificationSoundAVControllerAttributesDictionaryKey
SBUserNotificationSoundAVItemAttributesDictionaryKey SBUserNotificationSoundAVItemAttributesDictionaryKey
SBUserNotificationSoundRepeatDurationKey SBUserNotificationSoundRepeatDurationKey
kCFUserNotificationLocalizationPathKey LocalizationPath Documented.
kCFUserNotificationAlertHeaderKey AlertHeader Documented.
kCFUserNotificationAlertMessageKey AlertMessage Documented.
SBUserNotificationAlertMessageDelimiterKey SBUserNotificationAlertMessageDelimiterKey
kCFUserNotificationDefaultButtonTitleKey DefaultButtonTitle Documented.
kCFUserNotificationAlternateButtonTitleKey AlternateButtonTitle Documented.
kCFUserNotificationOtherButtonTitleKey OtherButtonTitle Documented.
kCFUserNotificationTextFieldTitlesKey TextFieldTitles Documented.
kCFUserNotificationTextFieldValuesKey TextFieldValues Documented.
SBUserNotificationTextFieldButtonDisplayTitle SBUserNotificationTextFieldButtonDisplayTitle
SBUserNotificationTextFieldButtonDisplayDefaultButtonTitle SBUserNotificationTextFieldButtonDisplayDefaultButtonTitle

References