@@ -27,6 +27,16 @@ class InfoDisplaySettingsViewController: FormViewController {
private func createForm() {
form
+ +++ Section("General")
+ <<< SwitchRow("hideInfoTable"){ row in
+ row.title = "Hide Information Table"
+ row.tag = "hideInfoTable"
+ row.value = UserDefaultsRepository.hideInfoTable.value
+ }.onChange { [weak self] row in
+ guard let value = row.value else { return }
+ UserDefaultsRepository.hideInfoTable.value = value
+ }
+
+++ MultivaluedSection(multivaluedOptions: .Reorder, header: "Information Display Settings", footer: "Arrage/Enable Information Desired") {
// TODO: add the other display values
@@ -398,6 +398,10 @@ class MainViewController: UIViewController, UITableViewDataSource, ChartViewDele
PredictionLabel.isHidden = isHidden
infoTable.isHidden = isHidden
+ if UserDefaultsRepository.hideInfoTable.value {
+ infoTable.isHidden = true
if UserDefaultsRepository.url.value != "" {
isEnabled = true
}
@@ -32,6 +32,7 @@ class UserDefaultsRepository {
"Pred."])
static let infoSort = UserDefaultsValue<[Int]>(key: "infoSort", default: [0,1,2,3,4,5,6,7,8,9])
static let infoVisible = UserDefaultsValue<[Bool]>(key: "infoVisible", default: [true,true,true,true,true,true,true,true,true,true])
+ static let hideInfoTable = UserDefaultsValue<Bool>(key: "hideInfoTable", default: false)
// Nightscout Settings
static let showNS = UserDefaultsValue<Bool>(key: "showNS", default: false)