(+ changing from second person to third person) |
(second person was clearer in this case) |
||
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, | 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"/> | ||
== Dialog description keys == | == Dialog description keys == |
Revision as of 08:28, 22 January 2014
Error creating thumbnail: File missing
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 |
---|---|---|
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
- Official documentation: http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFUserNotificationRef/Reference/reference.html
- Source code: http://www.opensource.apple.com/source/CF/CF-550/CFUserNotification.c
|