comparison LazyBearWatchOS Extension/NotificationController.swift @ 429:e4ca9898b79b

Add WatchOS Target
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 19 Jun 2021 16:20:58 +0200
parents
children
comparison
equal deleted inserted replaced
428:8c58ce834d95 429:e4ca9898b79b
1 //
2 // NotificationController.swift
3 // LazyBearWatchOS Extension
4 //
5 // Created by Dennis Concepción Martín on 19/6/21.
6 //
7
8 import WatchKit
9 import SwiftUI
10 import UserNotifications
11
12 class NotificationController: WKUserNotificationHostingController<NotificationView> {
13
14 override var body: NotificationView {
15 return NotificationView()
16 }
17
18 override func willActivate() {
19 // This method is called when watch view controller is about to be visible to user
20 super.willActivate()
21 }
22
23 override func didDeactivate() {
24 // This method is called when watch view controller is no longer visible
25 super.didDeactivate()
26 }
27
28 override func didReceive(_ notification: UNNotification) {
29 // This method is called when a notification needs to be presented.
30 // Implement it if you use a dynamic notification interface.
31 // Populate your dynamic notification interface as quickly as possible.
32 }
33 }