forked from LoopKit/LoopKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceNavigationController.swift
More file actions
32 lines (26 loc) · 992 Bytes
/
ServiceNavigationController.swift
File metadata and controls
32 lines (26 loc) · 992 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
27
28
29
30
31
32
//
// ServiceNavigationController.swift
// LoopKitUI
//
// Created by Darin Krauss on 5/23/19.
// Copyright © 2019 LoopKit Authors. All rights reserved.
//
import LoopKit
import UIKit
open class ServiceNavigationController: UINavigationController, ServiceOnboarding, CompletionNotifying {
public weak var serviceOnboardingDelegate: ServiceOnboardingDelegate?
public weak var completionDelegate: CompletionDelegate?
public func notifyServiceCreated(_ service: Service) {
serviceOnboardingDelegate?.serviceOnboarding(didCreateService: service)
}
public func notifyServiceOnboarded(_ service: Service) {
serviceOnboardingDelegate?.serviceOnboarding(didOnboardService: service)
}
public func notifyServiceCreatedAndOnboarded(_ service: ServiceUI) {
notifyServiceCreated(service)
notifyServiceOnboarded(service)
}
public func notifyComplete() {
completionDelegate?.completionNotifyingDidComplete(self)
}
}