CFUserNotification

From iPhone Development Wiki
Revision as of 15:36, 26 October 2014 by Uroboro (talk | contribs) (Reordering)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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, you 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
kCFUserNotificationAlertHeaderKey AlertHeader Documented.
kCFUserNotificationAlertMessageKey AlertMessage Documented.
kCFUserNotificationAlertTopMostKey AlertTopMost
kCFUserNotificationAlternateButtonTitleKey AlternateButtonTitle Documented.
kCFUserNotificationDefaultButtonTitleKey DefaultButtonTitle Documented.
kCFUserNotificationKeyboardTypesKey KeyboardTypes
kCFUserNotificationLocalizationPathKey LocalizationPath Documented.
kCFUserNotificationOtherButtonTitleKey OtherButtonTitle Documented.
kCFUserNotificationSoundPathKey SoundPath Documented.
kCFUserNotificationTextFieldTitlesKey TextFieldTitles Documented.
kCFUserNotificationTextFieldValuesKey TextFieldValues Documented.
kCFUserNotificationTimeoutKey Timeout Specify directly in the constructor instead.
kCFUserNotificationTokenKey Token
SBUserNotificationAlertMessageDelimiterKey SBUserNotificationAlertMessageDelimiterKey
SBUserNotificationAllowMenuButtonDismissal SBUserNotificationAllowMenuButtonDismissal
SBUserNotificationHideButtonsInAwayView SBUserNotificationHideButtonsInAwayView
SBUserNotificationDefaultButtonTag SBUserNotificationDefaultButtonTag
SBUserNotificationDismissOnLock DismissOnLock
SBUserNotificationDontDismissOnUnlock SBUserNotificationDontDismissOnUnlock
SBUserNotificationGroupsTextFields SBUserNotificationGroupsTextFields
SBUserNotificationOneButtonPerLine SBUserNotificationOneButtonPerLine
SBUserNotificationSoundAVControllerAttributesDictionaryKey SBUserNotificationSoundAVControllerAttributesDictionaryKey
SBUserNotificationSoundAVItemAttributesDictionaryKey SBUserNotificationSoundAVItemAttributesDictionaryKey
SBUserNotificationSoundRepeatDurationKey SBUserNotificationSoundRepeatDurationKey
SBUserNotificationTextAutocapitalizationType SBUserNotificationTextAutocapitalizationType
SBUserNotificationTextAutocorrectionType SBUserNotificationTextAutocorrectionType
SBUserNotificationTextFieldButtonDisplayTitle SBUserNotificationTextFieldButtonDisplayTitle
SBUserNotificationTextFieldButtonDisplayDefaultButtonTitle SBUserNotificationTextFieldButtonDisplayDefaultButtonTitle
SBUserNotificationTextFieldButtonDisplayDefaultButtonURL SBUserNotificationTextFieldButtonDisplayDefaultButtonURL
SBUserNotificationTextFieldButtonImagePath SBUserNotificationTextFieldButtonImagePath

External links