Array
extension Array where Element: CGA_WatchOS_BaseInterfaceController
This extension adds a bit of extra “sauce” to the shared prefs class, in that it adds stuff specific to our platform.
-
This subscript allows us to use an Array just like a Dictionary.
Declaration
Swift
subscript(inIDString: String) -> Element? { get set }
-
The main controller will always be the first one.
Declaration
Swift
var mainViewController: CGA_WatchOS_MainInterfaceController? { get }
-
The top controller will always be the last one (most times, we will just have two controllers in the Array, anyway).
Declaration
Swift
var topViewController: CGA_WatchOS_BaseInterfaceController? { get }