Introduction to user notifications
Chances are that if you've used an iOS device, you're very familiar with the user notification system. We'll review the components of notifications so that we're refreshed prior to coding, but before we do that it's worth taking a second to talk about notifications in iOS.
If you remember in the last chapter, when we were getting orientation changes, we used a class called NotificationCenter
to register for notifications. These system notifications are completely different from user notifications, which are visual elements that alert a user about things going on inside an app. Those system notifications were strictly code, notifying us, as a programmer, about things going on in other parts of our application's code.
You'll see later on when we start coding that we are dealing with the UUNNotificationContentandUNNotificationTrigger
objects for user alerts, as opposed to the Notification
objects we used to be notified of...