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

Add categories to notifications

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

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…

Contents