Dynamically sets ActiveAlarm Date and Time

This commit is contained in:
Aaron
2021-01-24 15:57:26 -05:00
parent 54eabb62d2
commit 599fc8a125
2 changed files with 16 additions and 0 deletions
@@ -23,6 +23,9 @@ class AlarmActivationViewController: UIViewController
@IBOutlet weak var rpsView: UIView!
@IBOutlet weak var rpsResult: UILabel!
//Other Outlets
@IBOutlet weak var timeLabel: UILabel!
@IBOutlet weak var dateLabel: UILabel!
init?(coder: NSCoder, currentAlarm: Alarm)
{
@@ -38,6 +41,17 @@ class AlarmActivationViewController: UIViewController
override func viewDidLoad()
{
super.viewDidLoad()
//Set the time and date
let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "MMM d, Y"
dateLabel.text = dateFormatter.string(from: date)
dateFormatter.dateFormat = "hh:mm"
timeLabel.text = dateFormatter.string(from: date)
//Hide all inactive wakemethods
puzzleView.isHidden = true
rpsView.isHidden = true