NACCTabBarController

class NACCTabBarController : UITabBarController
extension NACCTabBarController: UITabBarControllerDelegate

This is the tab bar controller. We subclass it, in order to localize, and customize its appearance and behavior.

Tab Index Enum

  • This is used to map the three tabs.

    See more

    Declaration

    Swift

    enum TabIndexes : Int
  • This is the “Action Item” button (share, print, etc.).

    Declaration

    Swift

    @IBOutlet
    weak var actionButton: UIBarButtonItem?

Base Class Overrides

  • Called when the view hierarchy load has been completed. We use this to set the tab bar colors, and select the last selected tab.

    Declaration

    Swift

    override func viewDidLoad()

Callbacks

  • Called when the action item in the navbar is hit.

    Declaration

    Swift

    @IBAction
    func actionItemHit(_ inButtonItem: UIBarButtonItem)

    Parameters

    inButton

    The action item button.

UITabBarControllerDelegate Conformance

  • This is called when a new tab is selected. We use it to save the last selected tab in our persistent prefs.

    Declaration

    Swift

    func tabBarController(_ inTabBarController: UITabBarController, didSelect inViewController: UIViewController)

    Parameters

    inTabBarController

    The tab bar controller.

    didSelect

    The selected View Controller.