[O] Replace isHidden = false with .show() and replace isHidden = true with .hide()

This commit is contained in:
Hykilpikonna
2021-01-27 18:00:14 -05:00
parent 3b735645e0
commit 3ad22b4a9c
2 changed files with 14 additions and 14 deletions
+8 -8
View File
@@ -37,8 +37,8 @@ class AccountViewController: UIViewController
*/ */
func login() func login()
{ {
vLogin.isHidden = true vLogin.hide()
vManage.isHidden = false vManage.show()
ManageVC.this.display() ManageVC.this.display()
} }
@@ -51,8 +51,8 @@ class AccountViewController: UIViewController
["id", "user", "pass", "family"].forEach { localStorage.removeObject(forKey: $0) } ["id", "user", "pass", "family"].forEach { localStorage.removeObject(forKey: $0) }
// Switch UI // Switch UI
vLogin.isHidden = false vLogin.show()
vManage.isHidden = true vManage.hide()
} }
} }
@@ -275,8 +275,8 @@ class FamilyVC: UIViewController
if let _ = Family.fromLocal() if let _ = Family.fromLocal()
{ {
// Family exists // Family exists
noFamilyView.isHidden = true noFamilyView.hide()
familyView.isHidden = false familyView.show()
table.dataSource = self table.dataSource = self
table.delegate = self table.delegate = self
@@ -284,8 +284,8 @@ class FamilyVC: UIViewController
else else
{ {
// Family doesn't exist // Family doesn't exist
noFamilyView.isHidden = false noFamilyView.show()
familyView.isHidden = true familyView.hide()
} }
} }
@@ -60,9 +60,9 @@ class AlarmActivationViewController: UIViewController
timeLabel.text = currentAlarm?.timeText timeLabel.text = currentAlarm?.timeText
// Hide all inactive wakemethods // Hide all inactive wakemethods
puzzleView.isHidden = true puzzleView.hide()
rpsView.isHidden = true rpsView.hide()
shakeView.isHidden = true shakeView.hide()
// Play sound // Play sound
timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(AlarmActivationViewController.playSound), userInfo: nil, repeats: true) timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(AlarmActivationViewController.playSound), userInfo: nil, repeats: true)
@@ -91,11 +91,11 @@ class AlarmActivationViewController: UIViewController
{ {
case "Factor": case "Factor":
self.puzzleAnswers = factorAction(puzzleQuestionLabel: puzzleQuestionLabel) self.puzzleAnswers = factorAction(puzzleQuestionLabel: puzzleQuestionLabel)
puzzleView.isHidden = false puzzleView.show()
case "RPS": case "RPS":
rpsView.isHidden = false rpsView.show()
case "Shake": case "Shake":
shakeView.isHidden = false shakeView.show()
shakeAction() shakeAction()
if regulate { if regulate {
endAlarm() endAlarm()