AmivMicroAppBarcode.swift 1.02 KB
Newer Older
domenicw's avatar
domenicw committed
1
2
3
4
//
//  AmivMicroAppBarcode.swift
//  Amiv
//
5
//  Created by Denis Zuppiger on 12.10.18.
domenicw's avatar
domenicw committed
6
7
8
9
10
11
12
13
14
15
16
17
18
//  Copyright © 2018 Amiv an der ETH. All rights reserved.
//

import Foundation
import UIKit

public class AmivMicroAppBarcode: AmivMicroApp {
    
    // MARK: - Variables
    
    public var delegate: AmivMicroAppDelegate
    
    public var rootViewController: UIViewController {
19
        return navigationController
domenicw's avatar
domenicw committed
20
21
    }
    
22
23
24
25
26
27
28
29
30
    public var navigationController: UINavigationController = {
        let nav = UINavigationController()
        return nav
    }()
    
    private var barcodeController: UIViewController = {
        let con  = BarcodeViewController(model: AmivMicroAppModel.createBarcodeModel())
        return con
    }()
domenicw's avatar
domenicw committed
31
32
33
34
35
    
    // MARK: - Initializers
    
    public init(delegate: AmivMicroAppDelegate) {
        self.delegate = delegate
36
        navigationController.pushViewController(barcodeController, animated: false)
domenicw's avatar
domenicw committed
37
38
39
40
41
42
43
44
    }
    
    // MARK: - App lifetime
    
    public func start() -> Bool {
        return true
    }
}