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.
Add categories to notifications
From the course: iOS and watchOS App Development: Notifications
Add categories to notifications
- Now that we have these new categories set, you're going to use them in your notification content. So let's hop on over, to the viewController. And, I'm going to go start with the snooze category, in my schedulePizza, and so down here in content... There's another property called the category identifier, and you just take the category identifier and you make that your category, your snooze... Dot... Category, like so. And then we're going to do the same thing with makePizza, and I'm going to use the pizza steps for here. So I go down to my content, for this, and put in... Category identifier equals pizza.steps.category, like so! Now you don't have to keep the same category for the life of the app. So if we're on the last pizza step that we've talked about before, I'm going to change it to category. So, it manages updatePizzaContent, so go over here. We have the updatePizzaContent, and we set that up, where we had the newStepNumber pizzaSteps.count minus one, was we're going to change…
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)
-
-
-
-
-
-
-