CGA_WatchOS_CharacteristicInterfaceController

class CGA_WatchOS_CharacteristicInterfaceController : CGA_WatchOS_BaseInterfaceController

This View Controller is for the individual Characteristic screen.

  • This is the Characteristic instance.

    Declaration

    Swift

    weak var characteristicInstance: CGA_Bluetooth_Characteristic?
  • This is the row index of the first Descriptor.

    Declaration

    Swift

    var baseOfDescriptors: Int
  • This displays the Characteristics the Service has available.

    Declaration

    Swift

    @IBOutlet
    weak var propertiesTable: WKInterfaceTable!

Instance Methods

  • This adds Characteristic Properties to the table for display.

    Declaration

    Swift

    func populateTable()
  • To reduce CC.

    Declaration

    Swift

    func populateTable2(_ inPropertyArray: [(type: String, value: String)])
  • To reduce CC.

    Declaration

    Swift

    func populateTable3(_ inPropertyArray: [(type: String, value: String)])
  • Establishes accessibility labels.

    Declaration

    Swift

    func setAccessibility()

Overridden Base Class Methods

  • This is called as the view is established.

    Declaration

    Swift

    override func awake(withContext inContext: Any?)

    Parameters

    withContext

    The context, passed in from the main view. It will be the device discovery struct.

  • Table touch handler.

    Declaration

    Swift

    override func contextForSegue(withIdentifier inSegueIdentifier: String, in inTable: WKInterfaceTable, rowIndex inRowIndex: Int) -> Any?

    Parameters

    withIdentifier

    The segue ID for this (we ignore)

    in

    The table instance

    rowIndex

    The vertical position (0-based) of the row that was touched.

    Return Value

    The context, if any. Can be nil.

CGA_WatchOS_Base_Protocol Conformance

  • This sets everything up to reflect the current state of the Characteristic.

    Declaration

    Swift

    override func updateUI()