| 12345678910111213141516171819202122232425262728293031323334 |
- //
- // MockService+UI.swift
- // MockKitUI
- //
- // Created by Darin Krauss on 5/17/19.
- // Copyright © 2019 LoopKit Authors. All rights reserved.
- //
- import SwiftUI
- import LoopKit
- import LoopKitUI
- import MockKit
- import HealthKit
- extension MockService: ServiceUI {
- public static var image: UIImage? {
- return UIImage(systemName: "icloud.and.arrow.up")
- }
-
- public static var providesOnboarding: Bool { return false }
-
- public static func setupViewController(currentTherapySettings: TherapySettings, preferredGlucoseUnit: HKUnit, chartColors: ChartColorPalette, carbTintColor: Color, glucoseTintColor: Color, guidanceColors: GuidanceColors, insulinTintColor: Color) -> (UIViewController & ServiceSetupNotifying & CompletionNotifying)? {
- return ServiceViewController(rootViewController: MockServiceTableViewController(service: MockService(), for: .create))
- }
- public func settingsViewController(currentTherapySettings: TherapySettings, preferredGlucoseUnit: HKUnit, chartColors: ChartColorPalette, carbTintColor: Color, glucoseTintColor: Color, guidanceColors: GuidanceColors, insulinTintColor: Color) -> (UIViewController & ServiceSettingsNotifying & CompletionNotifying) {
- return ServiceViewController(rootViewController: MockServiceTableViewController(service: self, for: .update))
- }
-
- public func supportMenuItem(supportInfoProvider: SupportInfoProvider, urlHandler: @escaping (URL) -> Void) -> AnyView? {
- return nil
- }
- }
|