TextInputViewController

class TextInputViewController : UIViewController

Controller for handling the APDU / Escape Command input

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

    Declaration

    Swift

    var delegate: TextInputViewControllerProtocol?
  • Flag indicating what the view is handling (APDU or Escape Command)

    Declaration

    Swift

    var isApdu: Bool
  • Control outlet for main dialog box UIView

    Declaration

    Swift

    @IBOutlet
    weak var dialogBoxView: UIView!
  • Control outlet for input HexEditUITextView

    Declaration

    Swift

    @IBOutlet
    weak var textView: HexEditUITextView!
  • Control outlet for OK UIButton

    Declaration

    Swift

    @IBOutlet
    weak var buttonOK: UIButton!
  • 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()
  • 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

  • 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

  • Close button callback. Closes the popup.

    Declaration

    Swift

    @IBAction
    func onCloseClicked(_ sender: UIButton)

    Parameters

    sender

    UI control

  • Initialises the entered textview

    Declaration

    Swift

    private func initialiseTextView(textView: UITextView)

    Parameters

    textView

    textview to initialise

  • Closes the popup.

    Declaration

    Swift

    private func closePopup()