RVS_BTDriver_iOS_Test_Harness_NavigationController
class RVS_BTDriver_iOS_Test_Harness_NavigationController : UINavigationController
extension RVS_BTDriver_iOS_Test_Harness_NavigationController: RVS_BTDriverDelegate
The navigation controller is used to maintain the driver instance.
I know that I should define another class to do that, to be buzzword-compliant, but otherwise, this class would be empty, and there’s no sense wasting the namespace.
-
This is the instance of our driver class.
Declaration
Swift
internal var driverInstance: RVS_BTDriver! { get set }
-
These represent the persistent state.
Declaration
Swift
let prefs: RVS_BTDriver_Test_Harness_Prefs
-
This establishes the driver instance, wiping out any old one.
Declaration
Swift
func setUpDriver()
-
Displays the given message and title in an alert with an “OK” button.
Declaration
Swift
func displayAlert(_ inTitle: String, message inMessage: String, presentedBy inPresentingViewController: UIViewController! = nil)
Parameters
inTitle
a string to be displayed as the title of the alert. It is localized by this method.
message
a string to be displayed as the message of the alert. It is localized by this method.
presentedBy
An optional UIViewController object that is acting as the presenter context for the alert. If nil, we use the top controller of the Navigation stack.
-
Simple error reporting method.
Declaration
Swift
func btDriver(_ inDriver: RVS_BTDriver, encounteredThisError inError: RVS_BTDriver.Errors)
Parameters
inDriver
The
RVS_BTDriver
instance that encountered the error.encounteredThisError
The error that was encountered.
-
Called when a device has been added and instantiated.
This is optional, and is NOT guaranteed to be called in the main thread.
Declaration
Swift
func btDriver(_ inDriver: RVS_BTDriver, newDeviceAdded inDevice: RVS_BTDriver_DeviceProtocol)
Parameters
inDriver
The
RVS_BTDriver
instance calling this.newDeviceAdded
The device object, masked as a protocol.
-
Called to indicate that the driver’s status should be checked.
It may be called frequently, and there may not be any changes. This is mereley a “make you aware of the POSSIBILITY of a change” call.
This is optional, and is NOT guaranteed to be called in the main thread.
Declaration
Swift
func btDriverStatusUpdate(_ inDriver: RVS_BTDriver)
Parameters
driver
The
RVS_BTDriver
instance calling this. -
Called to indicate that the driver started or stopped scanning.
This is optional, and is NOT guaranteed to be called in the main thread.
Declaration
Swift
func btDriverScanningChanged(_ inDriver: RVS_BTDriver, isScanning inIsScanning: Bool)
Parameters
inDriver
The
RVS_BTDriver
instance calling this.isScanning
True, if the new state is scanning is on.