# TextInputViewController

    class TextInputViewController : UIViewController

Controller for handling the APDU / Escape Command input

- `delegate`

  Delegate, set this to the class acting as delegate for this class using the TextInputViewControllerProtocol

  #### Declaration

  Swift

      var delegate: TextInputViewControllerProtocol?

- `isApdu`

  Flag indicating what the view is handling (APDU or Escape Command)

  #### Declaration

  Swift

      var isApdu: Bool

- `dialogBoxView`

  Control outlet for main dialog box UIView

  #### Declaration

  Swift

      @IBOutlet
      weak var dialogBoxView: UIView!

- `textView`

  Control outlet for input HexEditUITextView

  #### Declaration

  Swift

      @IBOutlet
      weak var textView: HexEditUITextView!

- `buttonOK`

  Control outlet for OK UIButton

  #### Declaration

  Swift

      @IBOutlet
      weak var buttonOK: UIButton!

- `viewDidLoad()`

  Called after the controller’s view is loaded into memory. Initialises the local variables, the controls and starts the terminal list updater

  #### Declaration

  Swift

      override func viewDidLoad()

- `showPopup(parentVC:textViewContent:isApdu:)`

  Static function to create and show this view as a popup.

  #### Declaration

  Swift

      static func showPopup(parentVC: UIViewController, textViewContent: String, isApdu: Bool)

  #### Parameters

  `parentVC` | Parent view
  `textViewContent` | Content to show on the textview
  `isApdu` | Flag indicating if APDU is being handles or Escape Command

- `onOKClicked(_:)`

  OK button callback. Calls the delegate closePopup function to export the contents and closes the popup

  #### Declaration

  Swift

      @IBAction
      func onOKClicked(_ sender: UIButton)

  #### Parameters

  `sender` | UI control

- `onCloseClicked(_:)`

  Close button callback. Closes the popup.

  #### Declaration

  Swift

      @IBAction
      func onCloseClicked(_ sender: UIButton)

  #### Parameters

  `sender` | UI control

- `initialiseTextView(textView:)`

  Initialises the entered textview

  #### Declaration

  Swift

      private func initialiseTextView(textView: UITextView)

  #### Parameters

  `textView` | textview to initialise

- `closePopup()`

  Closes the popup.

  #### Declaration

  Swift

      private func closePopup()

Copyright (c) 2018-2024, AB Circle Ltd. All rights reserved.

Generated by jazzy ♪♫ v0.14.3, a Realm project.