RiValT_RunningTimer_Numerical_ViewController

@MainActor
class RiValT_RunningTimer_Numerical_ViewController : RiValT_RunningTimer_Base_ViewController

This implements the numerical (LED numbers) running timer display.

It draws the LEDs, along with a blur filter (to give the “gas” appearance), and a hex grid layer (to simulate gas fluorescent displays).

  • The color for the digital display, when in “Pause” mode.

    Declaration

    Swift

    @MainActor
    private static let _pausedLEDColor: UIColor?
  • The color of the digits, when the timer is running, and is still in “Start” mode.

    Declaration

    Swift

    @MainActor
    private static let _startLEDColor: UIColor?
  • The color of the digits, when the timer is running, and is in “Warn” mode.

    Declaration

    Swift

    @MainActor
    private static let _warnLEDColor: UIColor?
  • The color of the digits, when the timer is running, and is in “Final” mode.

    Declaration

    Swift

    @MainActor
    private static let _finalLEDColor: UIColor?
  • This is the density of the grid. It is this many hexagons high.

    Declaration

    Swift

    @MainActor
    private static let _gridDensity: CGFloat
  • This is the thickness of the hex grid lines.

    Declaration

    Swift

    @MainActor
    private static let _gridLineWidth: CGFloat
  • This is the main view, containing the digital display.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var digitalDisplayContainerView: UIView?
  • The hours digit pair.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var digitalDisplayViewHours: RVS_RetroLEDDigitalDisplay?
  • The minutes digit pair.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var digitalDisplayViewMinutes: RVS_RetroLEDDigitalDisplay?
  • The seconds digit pair.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var digitalDisplayViewSeconds: RVS_RetroLEDDigitalDisplay?
  • In order to maintain the proper aspect ratio of the digit pairs, we need to ensconce them in container views. This is the hours view.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var hoursContainerView: UIView?
  • In order to maintain the proper aspect ratio of the digit pairs, we need to ensconce them in container views. This is the minutes view.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var minutesContainerView: UIView?
  • In order to maintain the proper aspect ratio of the digit pairs, we need to ensconce them in container views. This is the seconds view.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var secondsContainerView: UIView?
  • The filter that gives the “gas blur” effect.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var blurFilterView: UIVisualEffectView?
  • The image that displays the “hex grid” over the digital display.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    weak var hexGridImageView: UIImageView?
  • The stack view that contains the digit pairs.

    Declaration

    Swift

    @IBOutlet
    @MainActor
    var digitContainerInternalView: UIView?

Private Static Functions

  • This function generates an overlay image of a faint “hex grid” that allows us to simulate an old-fashioned “fluorescent” display.

    See more

    Declaration

    Swift

    @MainActor
    private static func _generateHexOverlayImage(_ inBounds: CGRect) -> UIImage?

    Parameters

    inBounds

    The main bounds of the screen, from which the array will be calculated.

Base Class Overrides

  • Called, when the view hierarchy has been loaded.

    Declaration

    Swift

    @MainActor
    override func viewDidLoad()
  • Called before the screen is displayed.

    Declaration

    Swift

    @MainActor
    override func viewWillAppear(_ inIsAnimated: Bool)

    Parameters

    inIsAnimated

    True, if animated.

  • Called when the view will rearrange its view hierarchy.

    Declaration

    Swift

    @MainActor
    override func viewWillLayoutSubviews()
  • Called when the view has rearranged its view hierarchy.

    Declaration

    Swift

    @MainActor
    override func viewDidLayoutSubviews()
  • This forces the display to refresh.

    Declaration

    Swift

    @MainActor
    override func updateUI()

Instance Methods

  • This calculates the current time, and sets the digital display to that time.

    See more

    Declaration

    Swift

    @MainActor
    func setDigitDisplayTime()