CFUserNotificationCreateRunLoopSource(_:_:_:_:)
Creates a run loop source for a user notification.
Declaration
func CFUserNotificationCreateRunLoopSource(_ allocator: CFAllocator!, _ userNotification: CFUserNotification!, _ callout: CFUserNotificationCallBack!, _ order: CFIndex) -> CFRunLoopSource!Parameters
- allocator:
The allocator to use to allocate memory for the new object. Pass
NULLor kCFAllocatorDefault to use the current default allocator. - userNotification:
The user notification to use.
- callout:
The callback function to invoke when the user notification dialog is dismissed.
- order:
A priority index indicating the order in which run loop sources are processed. User notifications currently ignore this parameter. Pass
0for this value.
Return Value
The new CFRunLoopSource object. Ownership follows the The Create Rule.
Discussion
A run loop source needs to be added to a run loop before it can fire and call its callback function. To add the source to a run loop, use CFRunLoopAddSource(_:_:_:).
See Also
CFUserNotification Miscellaneous Functions
CFUserNotificationCancel(_:)CFUserNotificationCheckBoxChecked(_:)CFUserNotificationCreate(_:_:_:_:_:)CFUserNotificationDisplayAlert(_:_:_:_:_:_:_:_:_:_:_:)CFUserNotificationDisplayNotice(_:_:_:_:_:_:_:_:)CFUserNotificationGetResponseDictionary(_:)CFUserNotificationGetResponseValue(_:_:_:)CFUserNotificationGetTypeID()CFUserNotificationPopUpSelection(_:)CFUserNotificationReceiveResponse(_:_:_:)CFUserNotificationSecureTextField(_:)CFUserNotificationUpdate(_:_:_:_:)