From the course: Apple watchOS 7 App Development Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

SwiftUI notification views

SwiftUI notification views - watchOS Tutorial

From the course: Apple watchOS 7 App Development Essential Training

Start my 1-month free trial

SwiftUI notification views

- [Instructor] You've seen one notification up here. But what if you want to customize the notification? The best way is with SwiftUI. And our app is currently set up for a SwiftUI notification. So I'm going to head dismiss this and let's close it up. And I'm going to go down here to the notification controller and we don't need to preview anymore. So I'm going to hit command return here, get rid of it. We can see what we've got here. We've got a notification controller. It's got, it adopts a WK user notification hosting controller. And of most important to us right now is this right here. It's got a body named notification view and it returns a notification view. And if you go down into notification view down here, which is right underneath it. You'll see it's just a SwiftUI view with the words, hello world, which we just saw in the notification. So all I do is I create some SwiftUI for the body and put it in here. Now…

Contents