NACCInitialViewController
@MainActor
class NACCInitialViewController : NACCBaseViewController
extension NACCInitialViewController: EKEventEditViewDelegate
This screen displays the date selector, and the textual cleantime report. This is the first screen to be shown.
-
This has the minimal screen height for viewing the logo.
Declaration
Swift
@MainActor private static let _minimumScreenHeight: CGFloat -
The sizing coefficient to use. This compares against the screen size (center image “watermark”).
Declaration
Swift
@MainActor private static let _tagSizeCoefficient: CGFloat -
The period that we use for the “fade in” animation.
Declaration
Swift
@MainActor private static let _fadeAnimationPeriod: CGFloat -
The ID of a segue to show the tabs.
Declaration
Swift
@MainActor private static let _cleandateDisplaySegueID: String
-
This will allow us to add events to the Calendar, without leaving this app.
Declaration
Swift
@MainActor private let _eventStore: EKEventStore -
This stores the original logo height
Declaration
Swift
@MainActor private var _originalLogoHeight: CGFloat -
This will contain the cleantime display for this screen. We set it at runtime.
Declaration
Swift
@MainActor private var _cleantimeDisplayView: LGV_UICleantimeImageViewBase? -
This handles the session delegate.
Declaration
Swift
@MainActor private var _wcSessionDelegateHandler: NACCWatchAppContentViewWatchDelegate?
-
This allows the tester to select a date.
Declaration
Swift
@IBOutlet @MainActor weak var dateSelector: UIDatePicker? -
This displays a textual representation of the cleantime.
Declaration
Swift
@IBOutlet @MainActor weak var cleantimeReportLabel: UILabel? -
This is where the cleantime view is shown, and centers it.
Declaration
Swift
@IBOutlet @MainActor weak var cleantimeViewContainer: UIView? -
This button brings in the info screen.
Declaration
Swift
@IBOutlet @MainActor weak var infoButton: UIBarButtonItem? -
This button allows us to create calendar events.
Declaration
Swift
@IBOutlet @MainActor weak var calendarButton: UIBarButtonItem? -
This is a container view for the logo, at the top of the screen.
Declaration
Swift
@IBOutlet @MainActor weak var logoContainerView: UIView? -
This is a switched-off constraint that collapses the medallion/keytag view, when the screen is a shorty.
Declaration
Swift
@IBOutlet @MainActor weak var cleantimeDisplayHeightConstraint: NSLayoutConstraint? -
This does the same for the logo (but we use the constant, so it animates better).
Declaration
Swift
@IBOutlet @MainActor weak var logoHeightConstraint: NSLayoutConstraint? -
This is the “Action Item” button (share, print, etc.).
Declaration
Swift
@IBOutlet @MainActor weak var actionButton: UIBarButtonItem? -
The “startup” logo that we fade out.
Declaration
Swift
@IBOutlet @MainActor weak var startupLogo: UIImageView?
-
Sets the date, first time through.
If we pass in a date, then we ignore the prefs.
Declaration
Swift
@MainActor func setDate(_ inDate: Date? = nil, tabIndex inTabIndex: NACCTabBarController.TabIndexes? = nil)Parameters
inDateThe date to set. It’s optional. Don’t specify it to use the prefs.
tabIndexThe tab index to choose. This is optional. If not specified, we do not open a tab.
-
This handles the “fade in” animation. This only happens, the first time.
Declaration
Swift
@MainActor func fadeInAnimation() -
Forces a recalculation
Declaration
Swift
@MainActor func updateScreen()
-
Called when the view hierarchy has been completed.
Declaration
Swift
@MainActor override func viewDidLoad() -
Called just before the view appears. We use it to set the date picker date.
Declaration
Swift
@MainActor override func viewWillAppear(_ inIsAnimated: Bool)Parameters
inIsAnimatedTrue, if the appearance is to be animated.
-
Called when the subviews have been arranged.
Declaration
Swift
@MainActor override func viewDidLayoutSubviews()
-
This will update our internal state, to match the new application context that we received from the Watch.
Declaration
Swift
@MainActor func updateApplicationContext(_ inApplicationContext: [String : Any])Parameters
inApplicationContextThe new context dictionary.
-
If the report text is hit, we open to whatever tab was last selected.
Declaration
Swift
@IBAction @MainActor func textHit(_: Any) -
If the logo is hit, we open to the keytag array tab
Declaration
Swift
@IBAction @MainActor func logoImageHit(_: Any) -
If the medallion/keytag is hit, we open to medallions, if over a year, keytag array, otherwise.
Declaration
Swift
@IBAction @MainActor func medallionImageHit(_: Any) -
When a new date is selected, we generate a new report.
Declaration
Swift
@IBAction @MainActor func newDate(_ inDatePicker: UIDatePicker! = nil)Parameters
inDatePickerThe picker instance. This can be ignored (in which case we try the date selector).
-
Called when the action item in the navbar is hit.
Declaration
Swift
@IBAction @MainActor func actionItemHit(_ inButtonItem: UIBarButtonItem)Parameters
inButtonThe action item button.
-
Called when the calendar button is hit.
See moreDeclaration
Swift
@IBAction @MainActor func calendarButtonHit(_: UIBarButtonItem)
-
Called when the even kit has completed with an action to add the reminder to the calendar.
Declaration
Swift
@MainActor func eventEditViewController(_ inController: EKEventEditViewController, didCompleteWith inAction: EKEventEditViewAction)Parameters
inControllerThe controller we’re talking about.
didCompleteWithThe even action that completed.
View on GitHub