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
+2
View File
@@ -716,11 +716,13 @@
</constraints>
</view>
<connections>
<outlet property="dateLabel" destination="42Q-0v-ZS3" id="t7y-cH-391"/>
<outlet property="puzzleAnswerInput" destination="eTb-g7-8x3" id="xIh-TJ-vhq"/>
<outlet property="puzzleQuestionLabel" destination="CZ0-R6-FDq" id="gon-N6-XTD"/>
<outlet property="puzzleView" destination="OMQ-qK-fej" id="KLT-oe-RJX"/>
<outlet property="rpsResult" destination="HEP-oh-VSY" id="W2G-eZ-mzI"/>
<outlet property="rpsView" destination="NmX-iJ-1D0" id="Rhg-Hm-2Xx"/>
<outlet property="timeLabel" destination="vmg-Oj-8tB" id="FJJ-No-dwF"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="78q-sr-CNz" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>