RVS_BTDriver_WatchOS_Test_Harness_Settings_InterfaceController

class RVS_BTDriver_WatchOS_Test_Harness_Settings_InterfaceController : WKInterfaceController

This class controls the display of the settings screen.

Instance Properties

IBOutlet Properties

  • This is a switch that reflects and controls whether or not the driver will be set up to use a non-main thread. True means that it uses the Global Thread.

    Declaration

    Swift

    @IBOutlet
    weak var useDifferentThreadSwitch: WKInterfaceSwitch!
  • This is a switch that reflects and controls whether the scan will “discover” the device, even if it has been removed. If false, then removing a device -even while scanning- will cause it to remain removed until scanning is toggled again.

    Declaration

    Swift

    @IBOutlet
    weak var rescanSwitch: WKInterfaceSwitch!
  • This is a switch that reflects and controls whether or not the initial connection (to get device info) is retained, so the device remains in connected state. If true, then the connection will remain on. If false, the connection is terminated just after reading the info.

    Declaration

    Swift

    @IBOutlet
    weak var persistentConnectionSwitch: WKInterfaceSwitch!

IBAction Handler Methods

  • This is called when the Use Different Thread switch is toggled.

    Declaration

    Swift

    @IBAction
    func useDifferentThreadSwitchHit(_ inValue: Bool)

    Parameters

    inValue

    The new value of the switch.

  • This is called when the Rescan switch is toggled.

    Declaration

    Swift

    @IBAction
    func rescanSwitchHit(_ inValue: Bool)

    Parameters

    inValue

    The new value of the switch.

  • This is called when the Persistent Connection switch is toggled.

    Declaration

    Swift

    @IBAction
    func persistentConnectionSwitchHit(_ inValue: Bool)

    Parameters

    inValue

    The new value of the switch.

Overridden Base Class Methods

  • Called when the sheet is loaded.

    Declaration

    Swift

    override func awake(withContext inContext: Any?)

    Parameters

    withContext

    The context that may have been set by the presenting view controller.