CGA_ServiceViewController

class CGA_ServiceViewController : CGA_BaseViewController
extension CGA_ServiceViewController: CGA_UpdatableScreenViewController
extension CGA_ServiceViewController: UITableViewDataSource
extension CGA_ServiceViewController: UITableViewDelegate
  • The reuse ID for each row of the table.

    Declaration

    Swift

    static let characteristicTableCellReuseID: String
  • The ID of the segue to show Characteristic detail.

    Declaration

    Swift

    static let characteristicDetailSegueID: String
  • The Service wrapper instance for this Service.

    Declaration

    Swift

    var serviceInstance: CGA_Bluetooth_Service!
  • This label displays the device name.

    Declaration

    Swift

    @IBOutlet
    weak var nameLabel: UILabel!
  • The table that displays the Characteristics.

    Declaration

    Swift

    @IBOutlet
    weak var characteristicsTableView: UITableView!

Instance Methods

  • This sets up the accessibility and voiceover strings for the screen.

    Declaration

    Swift

    func setUpAccessibility()

Base Class Overrides

  • Called just after the view hierarchy has loaded.

    Declaration

    Swift

    override func viewDidLoad()
  • Called just before the characteristics display screen is pushed.

    Declaration

    Swift

    override func prepare(for inSegue: UIStoryboardSegue, sender inSender: Any?)

    Parameters

    for

    The segue that is being executed.

    sender

    The discovery information.

CGA_UpdatableScreenViewController Conformance

  • This simply makes sure that the table is displayed if BT is available, or the “No BT” image is shown, if it is not.

    Declaration

    Swift

    func updateUI()

UITableViewDataSource Conformance

  • Called to provide the data to display in the indicated table cell.

    Declaration

    Swift

    func tableView(_ inTableView: UITableView, cellForRowAt inIndexPath: IndexPath) -> UITableViewCell

    Parameters

    inTableView

    The Table View that is asking for this View.

    cellForRowAt

    The IndexPath of the cell.

    Return Value

    A new view, set up for the indicated cell.

  • Declaration

    Swift

    func tableView(_: UITableView, numberOfRowsInSection: Int) -> Int

    Return Value

    The number of rows in the table.

UITableViewDelegate Conformance

  • Called when a row is selected.

    Declaration

    Swift

    func tableView(_: UITableView, didSelectRowAt inIndexPath: IndexPath)

    Parameters

    didSelectRowAt

    The IndexPath of the selected row.