MacOS_SplitViewController
@MainActor
class MacOS_SplitViewController : NSSplitViewController
This is the first screen to come up, and contains all the other screens.
-
The discovery navigator side of the screen.
Declaration
Swift
@IBOutlet @MainActor weak var discoveryScreenSplitViewItem: NSSplitViewItem! -
The details side of the screen.
Declaration
Swift
@IBOutlet @MainActor var peripheralSplitViewItem: NSSplitViewItem! -
The characteristic split view, which is displayed to the right of the details view.
Declaration
Swift
@IBOutlet @MainActor var characteristicSplitViewItem: NSSplitViewItem!
-
This is called as we load. It simply ensures that we start off with just the simple discovery screen.
Declaration
Swift
@MainActor override func viewDidLoad()
-
Calling this, removes both of the right-hand screens, leaving only the device list screen. It also reduces the size of the screen.
Declaration
Swift
@MainActor func collapseSplit() -
This allows us to associate a new View Controller with the details side of the split.
Declaration
Swift
@MainActor func setPeripheralViewController(_ inPeripheralViewController: MacOS_PeripheralViewController? = nil)Parameters
inPeripheralViewControllerThe Peripheral View Controller to place there. If nil, or omitted, the placeholder will be set.
-
This allows us to associate a new View Controller with the characteristic details side of the split.
Declaration
Swift
@MainActor func setCharacteristicViewController(_ inCharacteristicViewController: MacOS_CharacteristicViewController? = nil)Parameters
inCharacteristicViewControllerThe Characteristic View Controller to place there. If nil, or omitted, the view will be removed.
View on GitHub