mirror of
https://github.com/exyte/PopupView.git
synced 2026-06-06 20:18:33 +00:00
34 lines
964 B
Swift
34 lines
964 B
Swift
//
|
|
// NotificationController.swift
|
|
// ExampleWatch WatchKit Extension
|
|
//
|
|
// Created by Alisa Mylnikova on 17/08/2020.
|
|
//
|
|
|
|
import WatchKit
|
|
import SwiftUI
|
|
import UserNotifications
|
|
|
|
class NotificationController: WKUserNotificationHostingController<NotificationView> {
|
|
|
|
override var body: NotificationView {
|
|
return NotificationView()
|
|
}
|
|
|
|
override func willActivate() {
|
|
// This method is called when watch view controller is about to be visible to user
|
|
super.willActivate()
|
|
}
|
|
|
|
override func didDeactivate() {
|
|
// This method is called when watch view controller is no longer visible
|
|
super.didDeactivate()
|
|
}
|
|
|
|
override func didReceive(_ notification: UNNotification) {
|
|
// This method is called when a notification needs to be presented.
|
|
// Implement it if you use a dynamic notification interface.
|
|
// Populate your dynamic notification interface as quickly as possible.
|
|
}
|
|
}
|