From the course: iOS and watchOS App Development: Notifications
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Code the snooze button
From the course: iOS and watchOS App Development: Notifications
Code the snooze button
- [Instructor] You've done the simple like button The snooze button provides us with a few more techniques you need to know when making actions in the content extension. Buttons do not have notification information. You'll have to extract that if you take a look over here in the notification view controller again, the place we're going to get that is our did receive notification. I already set one up for content. But I want to set up one more for requests. So what we're going to do is go up here and I'm just going to do var request identifier equals and I'm just going to leave this a blank string. And then come down here to the did receive notification. I've got the full notification here. I'm going to just need that identifier to fire off a new notification. So what we're going to do here is I'm just going to do request identifier equals notification dot request dot identifier. I'm using the did receive notification to get these two and that will get me enough information for my…
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)
Add the content extension1m 15s
-
(Locked)
Change the UI3m 53s
-
(Locked)
Code the view controller4m 9s
-
(Locked)
Change plist settings3m 6s
-
(Locked)
Customize actions3m 4s
-
(Locked)
Customize requests4m 15s
-
(Locked)
Add buttons2m 57s
-
(Locked)
Use buttons for actions3m 31s
-
(Locked)
Code the snooze button3m 57s
-
(Locked)
-
-
-