-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSecondViewController.swift
71 lines (36 loc) · 1.32 KB
/
SecondViewController.swift
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import UIKit
class SecondViewController: UIViewController {
// MARK: update App, make share (now hidden)
var bgColor = UIColor()
var textColor = UIColor()
let yesNo = ["YES", "NO"]
@IBOutlet weak var labelFromTextField: UILabel!
@IBOutlet weak var labelAnswer: UILabel!
@IBOutlet weak var shareOutlet: UIButton!
@IBAction func shareAction(_ sender: UIButton) {
}
@IBAction func backAction(_ sender: UIButton) {
}
@IBOutlet weak var backOutlet: UIButton!
var myString = String()
override func viewDidLoad() {
super.viewDidLoad()
elementColors()
autoResizing()
}
func autoResizing() {
labelFromTextField.adjustsFontSizeToFitWidth = true
}
func elementColors() {
labelFromTextField.text = myString
labelAnswer.text = yesNo.randomElement()
view.backgroundColor = bgColor
labelAnswer.textColor = textColor
labelFromTextField.textColor = textColor
backOutlet.tintColor = textColor
shareOutlet.tintColor = textColor
}
override var prefersStatusBarHidden: Bool {
return true
}
}