CGA_DescriptorInteractionViewController

class CGA_DescriptorInteractionViewController : CGA_BaseViewController, CGA_WriteableElementContainer
extension CGA_DescriptorInteractionViewController: CGA_UpdatableScreenViewController
extension CGA_DescriptorInteractionViewController: UITextViewDelegate

This controls the Interaction View.

  • This is a carriage return/linefeed pair, which will always be used in place of a simple CR or LF, alone.

    Declaration

    Swift

    private static let _crlf: String
  • The horizontal stack view that contains the write items

    Declaration

    Swift

    @IBOutlet
    weak var writeStackView: UIStackView!
  • The label that says “WRITE”

    Declaration

    Swift

    @IBOutlet
    weak var writeLabel: UILabel!
  • The text view that contains text to be sent.

    Declaration

    Swift

    @IBOutlet
    weak var writeTextView: UITextView!
  • The button that appears when there is text in the text view. Pressing this, sends the data.

    Declaration

    Swift

    @IBOutlet
    weak var writeSendButton: UIButton!
  • The Descriptor that is associated with this view controller.

    Declaration

    Swift

    var writeableElementInstance: CGA_Bluetooth_Writable?
  • The Descriptor that is associated with this view controller, cast from the writable entity.

    Declaration

    Swift

    var myDescriptorInstance: CGA_Bluetooth_Descriptor? { get }

Private Methods

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

    Declaration

    Swift

    func setUpAccessibility()

IBAction Handlers

  • This reacts to a tap in the area outside the keyboard, and puts away the keyboard.

    Declaration

    Swift

    @IBAction
    func tappedInScreen(_: Any! = nil)
  • Declaration

    Swift

    @IBAction
    func writeSendButtonHit(_: Any! = nil)

Base Class Override

  • Called when the view has loaded.

    Declaration

    Swift

    override func viewDidLoad()

CGA_UpdatableScreenViewController Conformance

  • This simply makes sure that the UI matches the state of the Characteristic.

    Declaration

    Swift

    func updateUI()

Text View Delegate

  • Called when some text or attributes change in the text view.

    Declaration

    Swift

    func textViewDidChange(_ inTextView: UITextView)

    Parameters

    inTextView

    The Text View that experienced the change.