From the course: iOS and watchOS App Development: Notifications
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Add buttons
From the course: iOS and watchOS App Development: Notifications
Add buttons
- [Instructor] While action buttons are standard for notifications, you can also use buttons either to replace or add more functionality to the notification. Let's move our actions into UI buttons. So we're going to stop the app here, and head on over to our storyboard, and I'm going to add a few more things. Let's organize ourselves a little better here. And I'm going to pull open with Option + Click, the library and find my buttons, and I'm going to drag two buttons on the bottom here, and we're going to make those into a stack view. So select both buttons, down here for stack view, and I'm going to make them horizontal so they're side-by-side. Alignment will be fill, distribution will be fill equally, that's my two buttons. I can close the object library. I'm going to open up the stack view so I can click on each one of these easily. And so for the first button here, we'll make that snooze. And for the second button, we'll make that like. I'm going to select both buttons again, and…
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)
-
-
-