2021-12-16 22:45:18 -08:00
|
|
|
//
|
|
|
|
|
// Preferences.swift
|
|
|
|
|
// MeshtasticClient
|
|
|
|
|
//
|
|
|
|
|
// Created by Garth Vander Houwen on 12/16/21.
|
|
|
|
|
//
|
2021-12-25 23:48:12 -08:00
|
|
|
// import Foundation
|
|
|
|
|
// import Combine
|
|
|
|
|
// import SwiftUI
|
2021-12-16 22:45:18 -08:00
|
|
|
//
|
2021-12-25 23:48:12 -08:00
|
|
|
// class Prefs
|
|
|
|
|
// {
|
2021-12-16 22:45:18 -08:00
|
|
|
// private let defaults = UserDefaults.standard
|
|
|
|
|
//
|
|
|
|
|
// private let keyIntExample = "intExample"
|
|
|
|
|
//
|
|
|
|
|
// var intExample = {
|
|
|
|
|
// set {
|
|
|
|
|
// defaults.setValue(newValue, forKey: keyIntExample)
|
|
|
|
|
// }
|
|
|
|
|
// get {
|
|
|
|
|
// return defaults.integer(forKey: keyIntExample)
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// class var shared: Prefs {
|
|
|
|
|
// struct Static {
|
|
|
|
|
// static let instance = Prefs()
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// return Static.instance
|
|
|
|
|
// }
|
2021-12-25 23:48:12 -08:00
|
|
|
// }
|