RiValT_Base_ViewController
@MainActor
class RiValT_Base_ViewController : UIViewController
extension RiValT_Base_ViewController: UIPopoverPresentationControllerDelegate
This provides basic utilities and UI for all screens in the app.
-
The lightest light, when light.
Declaration
Swift
@MainActor private static let _lightModeMax: CGFloat -
The darkest dark, when light.
Declaration
Swift
@MainActor private static let _lightModeMin: CGFloat -
The lightest light, when dark.
Declaration
Swift
@MainActor private static let _darkModeMax: CGFloat -
The darkest dark, when dark.
Declaration
Swift
@MainActor private static let _darkModeMin: CGFloat -
This will provide haptic/audio feedback for subtle events.
Declaration
Swift
@MainActor private let _selectionFeedbackGenerator: UISelectionFeedbackGenerator -
This will provide haptic/audio feedback for more significant events.
Declaration
Swift
@MainActor private let _impactFeedbackGenerator: UIImpactFeedbackGenerator -
The layer with the background gradient.
Declaration
Swift
@MainActor weak var gradientLayer: CALayer? -
Full screens use the app gradient. A popover supplies its own opaque background.
Declaration
Swift
@MainActor var usesBackgroundGradient: Bool { get }
-
This references the main app delegate.
It’s an implicit optional, because the whole shebang goes into the crapper, if it doesn’t work.
Declaration
Swift
@MainActor weak var appDelegateInstance: RiValT_AppDelegate! { get } -
This references the iOS app instance of the Watch Delegate class.
It’s an implicit optional, because the whole shebang goes into the crapper, if it doesn’t work.
Declaration
Swift
@MainActor weak var watchDelegate: RiValT_WatchDelegate! { get } -
This is the application-global timer model.
It’s an implicit optional, because the whole shebang goes into the crapper, if it doesn’t work.
Declaration
Swift
@MainActor weak var timerModel: TimerModel! { get }
-
Called when the view hierarchy has been set up.
Declaration
Swift
@MainActor override func viewDidLoad() -
Installs the app’s back button when needed and applies the bar item appearance.
Declaration
Swift
@MainActor override func viewWillAppear(_ animated: Bool) -
Returns to the previous screen on the navigation stack.
Declaration
Swift
@objc @MainActor private func goBack() -
Configure storyboard items before presentation, and refresh after returning from a popover.
See moreDeclaration
Swift
@MainActor private func hideBarItemBackgrounds() -
Refreshes bar item styling and publishes the controls available on the newly visible screen.
Declaration
Swift
@MainActor override func viewDidAppear(_ animated: Bool) -
Publishes the host controls after this screen is no longer visible.
Declaration
Swift
@MainActor override func viewDidDisappear(_ animated: Bool) -
Called when the view has laid out its subviews.
We use this to set the background.
Declaration
Swift
@MainActor override func viewDidLayoutSubviews()
-
Triggers a selection haptic.
Declaration
Swift
@MainActor func selectionHaptic() -
Triggers an impact haptic.
Declaration
Swift
@MainActor func impactHaptic(_ inIntensity: CGFloat = 0.5)Parameters
inIntensity0.0 -> 1.0, with 0 being the least, and 1 being the most. Optional (default is 0.5)
-
This updates the stored timer model.
Declaration
Swift
@MainActor func updateSettings()
-
Called to ask if there’s any possibility of this being displayed in another way.
Declaration
Swift
@MainActor func adaptivePresentationStyle(for: UIPresentationController) -> UIModalPresentationStyleParameters
forThe presentation controller we’re talking about.
Return Value
No way, Jose.
-
Called to ask if there’s any possibility of this being displayed in another way (when the screen is rotated).
Declaration
Swift
@MainActor func adaptivePresentationStyle(for: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyleParameters
forThe presentation controller we’re talking about.
traitCollectionThe traits, describing the new orientation.
Return Value
No way, Jose.
-
Called to allow us to do something before dismissing a popover.
Declaration
Swift
@MainActor func popoverPresentationControllerShouldDismissPopover(_: UIPopoverPresentationController) -> BoolReturn Value
True (all the time).
-
Called to allow us to do something before displaying a popover.
Declaration
Swift
@MainActor func prepareForPopoverPresentation(_: UIPopoverPresentationController)
-
Measure visible content without allowing its current frame to compress the requested width.
Declaration
Swift
@MainActor func popoverContentWidth(_ content: UIView) -> CGFloat -
Use the presenting window, so Split View and window resizing also limit the popover.
Declaration
Swift
@MainActor func adaptivePopoverWidth(for contentWidth: CGFloat) -> CGFloat
View on GitHub
Install in Dash