NACCBaseViewController

@MainActor
class NACCBaseViewController : UIViewController

This is a base class that provides a background gradient, and “watermark” image. It should be the base for all screens.

  • The alpha to use for normal contrast (center image “watermark”).

    Declaration

    Swift

    @MainActor
    private static let _watermarkAlpha: CGFloat
  • The sizing coefficient to use. This compares against the screen size (center image “watermark”).

    Declaration

    Swift

    @MainActor
    private static let _watermarkSizeCoefficient: CGFloat
  • This can be overloaded or set, to provide the image to be used as a background gradient.

    Declaration

    Swift

    @MainActor
    private var _backgroundGradientImage: UIImage?
  • This can be overloaded or set, to provide the image to be used as a “watermark.”

    Declaration

    Swift

    @MainActor
    private var _watermarkImage: UIImage?
  • This is the background image view.

    Declaration

    Swift

    @MainActor
    private var _myBackgroundGradientView: UIImageView?
  • This is the background center image view.

    Declaration

    Swift

    @MainActor
    private var _myCenterImageView: UIImageView?
  • This is set to the tab index for the page.

    Declaration

    Swift

    @MainActor
    var myTabIndex: NACCTabBarController.TabIndexes

Instance Methods

  • This creates a user activity for the given cleandate (as components).

    Declaration

    Swift

    @MainActor
    func activateActivity(for inCleandate: DateComponents, with inTabIndex: NACCTabBarController.TabIndexes = .undefined)

    Parameters

    for

    The cleandate (as date components).

    with

    The tab index of the page calling this.

Base Class Overrides

  • Called when the view hierarchy has been completed.

    Declaration

    Swift

    @MainActor
    override func viewDidLoad()
  • Called just after the view appears. We use it to create a user activity.

    Declaration

    Swift

    @MainActor
    override func viewDidAppear(_ inIsAnimated: Bool)

    Parameters

    inIsAnimated

    True, if the appearance is to be animated.