OptionsViewController
class OptionsViewController : UIViewController
Controller for handling the Custom Key input, readername filter and RSSI filter
-
delegate, set this to the class acting as delegate for this class using the CustomKeyViewControllerProtocol
Declaration
Swift
private weak var delegate: OptionsViewControllerProtocol?
-
Flag indicating if default key should be used
Declaration
Swift
private var useDefaultKey: Bool
-
Custom key
Declaration
Swift
private var customKey: String
-
Name Filter
Declaration
Swift
private var nameFilter: String
-
RSSI Filter
Declaration
Swift
private var rssiFilter: Int
-
Control outlet for Key Type UISegmentedControl
Declaration
Swift
@IBOutlet weak var segmentedKeyType: UISegmentedControl!
-
Control outlet for Custom Key HexEditUITextView
Declaration
Swift
@IBOutlet weak var customKeyTextView: HexEditUITextView!
-
Control outlet for Name Filter UITextField
Declaration
Swift
@IBOutlet weak var nameFilterTextField: UITextField!
-
Control outlet for RSSI Filter UITextField
Declaration
Swift
@IBOutlet weak var rssiFilterTextField: NumericUITextField!
-
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()
-
Sets the initial values of the view
Declaration
Swift
func setInitialValues(parentViewController: UIViewController, useDefaultKey: Bool, customKey: String, nameFilter: String, rssiFilter: Int)
Parameters
parentViewController
Parent controller to use as delegate
useDefaultKey
Initial flag indicating if default key is used
customKey
Initial custom key
-
Handles key type change
Declaration
Swift
@IBAction func onKeyTypeChanged(_ sender: UISegmentedControl)
Parameters
sender
UI control
-
OK button handler
Declaration
Swift
@IBAction func onOKClicked(_ sender: UIButton)
Parameters
sender
UI control
-
Close button handler
Declaration
Swift
@IBAction func onCloseClicked(_ sender: UIButton)
Parameters
sender
UI control
-
Initialises the text view properties
Declaration
Swift
private func initialiseTextView(textView: UITextView)
Parameters
textView
Textview control to initialise
-
Enable or disable UI
Declaration
Swift
private func enableUIFields()
-
Closes this view
Declaration
Swift
private func closeThis()