CGA_WatchOS_ServiceInterfaceController

class CGA_WatchOS_ServiceInterfaceController : CGA_WatchOS_BaseInterfaceController

This View Controller is for the individual Service screen.

  • This is the device discovery struct that describes this device.

    Declaration

    Swift

    weak var serviceInstance: CGA_Bluetooth_Service?
  • This displays the Characteristics the Service has available.

    Declaration

    Swift

    @IBOutlet
    weak var characteristicsTable: WKInterfaceTable!

Instance Methods

  • This adds Services to the table for display.

    Declaration

    Swift

    func populateTable()
  • 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 Service.

    Declaration

    Swift

    override func updateUI()