-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathViewController.swift
More file actions
48 lines (34 loc) · 1.03 KB
/
Copy pathViewController.swift
File metadata and controls
48 lines (34 loc) · 1.03 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// ViewController.swift
// XcodeGen-Example-Project
//
// Created by Joseph Colicchio on 1/8/21.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel! {
didSet {
label.accessibilityIdentifier = Constants.labelAccessibilityIdentifier
}
}
var configuration: AppConfiguration
var labelText: String {
return "This is the \(configuration.appName)"
}
var appNameEnv: String {
return ProcessInfo.processInfo.environment[Constants.appNameKey] ?? "NONE"
}
init?(coder: NSCoder, configuration: AppConfiguration) {
self.configuration = configuration
super.init(coder: coder)
}
required init?(coder: NSCoder) {
self.configuration = ConcreteAppConfiguration()
super.init(coder: coder)
}
override func viewDidLoad() {
super.viewDidLoad()
view.accessibilityIdentifier = Constants.viewAccessibilityIdentifier
label.text = labelText + "\n" + appNameEnv
}
}