forked from ps2/NightscoutService
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathNightscoutService+UI.swift
More file actions
26 lines (22 loc) · 925 Bytes
/
NightscoutService+UI.swift
File metadata and controls
26 lines (22 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//
// NightscoutService+UI.swift
// NightscoutServiceKitUI
//
// Created by Darin Krauss on 6/20/19.
// Copyright © 2019 LoopKit Authors. All rights reserved.
//
import SwiftUI
import LoopKit
import LoopKitUI
import NightscoutServiceKit
extension NightscoutService: ServiceUI {
public static var image: UIImage? {
UIImage(named: "nightscout", in: Bundle(for: ServiceUICoordinator.self), compatibleWith: nil)!
}
public static func setupViewController(colorPalette: LoopUIColorPalette, pluginHost: PluginHost, allowDebugFeatures: Bool) -> SetupUIResult<ServiceViewController, ServiceUI> {
return .userInteractionRequired(ServiceUICoordinator(colorPalette: colorPalette))
}
public func settingsViewController(colorPalette: LoopUIColorPalette, allowDebugFeatures: Bool) -> ServiceViewController {
return ServiceUICoordinator(service: self, colorPalette: colorPalette)
}
}