Jonas Björkert 2 роки тому
батько
коміт
7bc53f3599

+ 5 - 0
LoopFollow/ViewControllers/AlarmViewController.swift

@@ -248,6 +248,11 @@ class AlarmViewController: FormViewController {
         
         
         form
+            +++ ButtonRow() {
+                $0.title = "DONE"
+            }.onCellSelection { (row, arg)  in
+                self.dismiss(animated: true, completion: nil)
+            }
             +++ Section("Select Alert")
           <<< SegmentedRow<String>("bgAlerts"){ row in
                 row.title = ""

+ 11 - 1
LoopFollow/ViewControllers/SettingsViewController.swift

@@ -236,7 +236,17 @@ class SettingsViewController: FormViewController {
            ), onDismiss: nil)
             
         }
-        
+       <<< ButtonRow("alarmsSettings") {
+           $0.title = "Alarms"
+           $0.presentationMode = .show(
+            controllerProvider: .callback(builder: {
+                let storyboard = UIStoryboard(name: "Main", bundle: nil)
+                let controller = storyboard.instantiateViewController(withIdentifier: "AlarmViewController") as! AlarmViewController
+                controller.appStateController = self.appStateController
+                return controller
+            }), onDismiss: nil)
+       }
+
         +++ Section("Integrations")
         <<< ButtonRow() {
            $0.title = "Apple Watch and Carplay"