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
From the course: iOS and watchOS App Development: Notifications
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Get interactive with notifications1m 39s
-
(Locked)
Configure notification categories3m 47s
-
(Locked)
Add categories to notifications2m 19s
-
(Locked)
Add actions to categories4m 37s
-
(Locked)
Respond to action requests4m 13s
-
Code the action response2m 32s
-
(Locked)
Code the next action response4m 17s
-
(Locked)
Test actions1m 47s
-
(Locked)
Text response actions2m 50s
-
(Locked)
Text response requests4m 13s
-
(Locked)
-
-
-
-
-
-
-