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.
Text response actions
From the course: iOS and watchOS App Development: Notifications
Text response actions
- [Instructor] For most actions, a simple button to execute the action is enough. However, if you want to respond to someone in a messaging app, or need some other type of text input, then a button alone is not enough. The user notifications framework has a special sub-class of UN notification action that you can use to edit text input controller to your notification. As an example, you'll add a comment line to your notification. So go head and stop the app and head to the app delegate. And find the set categories function again. And we're going to add another action here underneath the cancel action and we're going to start calling it the let text input action. And that will equal a UN text input notification action. And you want the one with the placeholder this time. So we want this one that ends with placeholder on the end. K, and then a lot of this is going to be the same as what we did with the other actions. So the identifier, I'm going to make this text input. The title is…
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)
-
-
-
-
-
-
-