AppleNotification - UBogun/Xojo-iosLib GitHub Wiki
Inherits from AppleObject
Memory leak check: not yet done.
Status: completed.
This is an implementation of NSNotification, the class iOS uses for exchanging system notifications between different classes.
You will usually use an AppleNotificationCenter to register objects for existing notifications, but you can also definde custom notifications and send them to the registered objects.
General information
A notification can be defined by its name only (you can find the notification names in Apple’s developer docs or as constants in iOSLib classes) or by a combination of a name and a sourceobject, which means the notification carries information about the object where the circumstances firing the notification happened. Additionally, you can attach a UserDictionary (in form of an AppleDictionary) with information to be read on the receiver's part.
Xojo integration
No special wrapper yet. Use the features described below.
Constructors
Constructor (notificationName As CFStringRef, opt. SourceObject As AppleObject): Returns a new notification object with a specified name and object.
Constructor (notificationName As CFStringRef, SourceObject As AppleObject, UserInfo As AppleDictionary): Returns a new notification object with a specified name, object and userDictionary.
Properties
Name As Text (read-only): The notification name for which this notification was created.
NotificationObject As AppleObject (read-only): The object associated with the notification.
UserInfo As AppleDictionary (read-only): The user information dictionary associated with the receiver.
Methods
Post(): A Shortcut for AppleNotificationCenter.PostNotification (Notification) – sends the notification to its registered receivers.