diff --git a/main/Base.lproj/Main.storyboard b/main/Base.lproj/Main.storyboard index d943c7d..ba5c7fc 100644 --- a/main/Base.lproj/Main.storyboard +++ b/main/Base.lproj/Main.storyboard @@ -19,8 +19,8 @@ - - + + @@ -768,7 +768,7 @@ - + @@ -783,7 +783,8 @@ - + + @@ -792,12 +793,13 @@ - + - + + @@ -807,19 +809,19 @@ - + - + - + @@ -1026,7 +1028,7 @@ Duration: 60:00 - + diff --git a/main/Recordings/VCRecordings.swift b/main/Recordings/VCRecordings.swift index 5426c00..5cf556e 100644 --- a/main/Recordings/VCRecordings.swift +++ b/main/Recordings/VCRecordings.swift @@ -7,11 +7,8 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate { @IBOutlet private var timeLabel: UILabel! @IBOutlet private var startButton: UIButton! @IBOutlet private var startNewRecView: UIView! - private var prevRecController: UINavigationController! override func viewDidLoad() { - prevRecController = (children.first as! UINavigationController) - prevRecController.delegate = self timeLabel.font = timeLabel.font.monoSpace() // hide timer if not running updateUI(setRecording: false, animated: false) @@ -22,12 +19,16 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate { } } - override func viewDidAppear(_ animated: Bool) { + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) if currentRecording != nil { startTimer(animate: false) } + navigationController?.setNavigationBarHidden(true, animated: animated) } override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) stopTimer(animate: false) + navigationController?.setNavigationBarHidden(false, animated: animated) } func navigationController(_ nav: UINavigationController, willShow vc: UIViewController, animated: Bool) { @@ -57,8 +58,7 @@ class VCRecordings: UIViewController, UINavigationControllerDelegate { } else { stopTimer(animate: true) RecordingsDB.stop(¤tRecording!) - prevRecController.popToRootViewController(animated: true) - let editVC = (prevRecController.topViewController as! TVCPreviousRecords) + let editVC = (children.first as! TVCPreviousRecords) editVC.insertAndEditRecording(currentRecording!) currentRecording = nil // otherwise it will restart }