From the course: iOS and watchOS App Development: Notifications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Get interactive with notifications

Get interactive with notifications

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

Get interactive with notifications

- [Instructor] Up to now, you've used the default notification. There are some customizations you can do to notifications to make them more understandable and a lot more powerful. That power comes from categories and actions. Actions execute small amounts of your code in the background without opening your app. If there's something you can do immediately without opening the app, say a snooze button on an alarm, you can do it in notifications, instead of opening the application. In the user notification framework, an action is a label and an identifier you attach to the content of a notification. When the notification presents itself on a device, for every action, there will be one of these buttons under the notification the user can press. That action sends an identifier to a method of UN User Notification Center Delegate, and you write code there to respond to that button press. Categories are collections of these actions and as we'll discuss later, appearances. You collect a set, up…

Contents