CGA_WatchOS_PrefsInterfaceController
class CGA_WatchOS_PrefsInterfaceController : WKInterfaceController
This controls the modal prefs (“more”) screen.
-
The switch for “Connected Only”
Declaration
Swift
@IBOutlet weak var connectedOnlySwitch: WKInterfaceSwitch! -
The switch for “Empty Names”
Declaration
Swift
@IBOutlet weak var emptyNamesSwitch: WKInterfaceSwitch! -
The label above the RSSI slider
Declaration
Swift
@IBOutlet weak var rssiSectionLabel: WKInterfaceLabel! -
This label displays the value of the RSSI slider
Declaration
Swift
@IBOutlet weak var rssiLevelLabel: WKInterfaceLabel! -
This is the slider that sets the minimum RSSI
Declaration
Swift
@IBOutlet weak var minimumRSSISlider: WKInterfaceSlider! -
Used to track the prefs value while in this screen.
Declaration
Swift
var connectedOnly: Bool -
Used to track the prefs value while in this screen.
Declaration
Swift
var emptyNames: Bool -
Used to track the prefs value while in this screen.
Declaration
Swift
var currentRSSI: Int -
Simple accessor to the main extension delegate instance.
Declaration
Swift
var extensionDelegateInstance: CGA_WatchOS_ExtensionDelegate? { get } -
This accesses our stored preferences.
Declaration
Swift
var prefs: CGA_PersistentPrefs? { get }
-
Called when the “Connected Devices Only” switch is selected.
Declaration
Swift
@IBAction func connectedOnlySwitchHit(_ inValue: Bool)Parameters
inValueThe new value
-
Called when the “Allow Empty Names” switch is selected.
Declaration
Swift
@IBAction func emptyNamesSwitchHit(_ inValue: Bool)Parameters
inValueThe new value
-
Called when the RSSI Slider changes.
Declaration
Swift
@IBAction func rssiSliderChanged(_ inValue: Float)Parameters
inValueThe new value
-
Establishes accessibility labels.
Declaration
Swift
func setAccessibility()
-
Called as the View is set up.
Declaration
Swift
override func awake(withContext inContext: Any?)Parameters
withContextThe context provided to the view, as it was instantiated.
-
Called just before the view disappears.
We use this to set the main prefs to the ones selected by this screen.
Declaration
Swift
override func willDisappear()
-
This sets the various items to match the values recorded.
Declaration
Swift
func updateUI()
View on GitHub
CGA_WatchOS_PrefsInterfaceController Class Reference