Difference between revisions of "CFUserNotification"

From iPhone Development Wiki
Jump to: navigation, search
(+ changing from second person to third person)
Line 2: Line 2:
 
Although not part of the iPhone SDK, [[CFUserNotification]] does exist on the iPhoneOS. These notifications are shown on {{applink|SpringBoard}} like standard alert views.
 
Although not part of the iPhone SDK, [[CFUserNotification]] does exist on the iPhoneOS. These notifications are shown on {{applink|SpringBoard}} like standard alert views.
  
CFUserNotifications are sent to SpringBoard via the <tt>com.apple.SBUserNotification</tt> service, and a [[SBUserNotificationAlert]] will be shown. Because IPC is involved, you should use [[UIAlertView]] instead.<br clear="right"/>
+
CFUserNotifications are sent to SpringBoard via the <tt>com.apple.SBUserNotification</tt> service, and a [[SBUserNotificationAlert]] will be shown. Because IPC is involved, one should use [[UIAlertView]] instead.<br clear="right"/>
  
 
== Dialog description keys ==
 
== Dialog description keys ==

Revision as of 06:59, 21 January 2014

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