InitialViewController

class InitialViewController: GeneralUIViewController

Controls the initial view with which the user is presented.

  • A button for the user to create an account.

    Declaration

    Swift

    @IBOutlet weak var createAccountButton: GeneralUIButton!
  • A button for the user to login with existing credentails.

    Declaration

    Swift

    @IBOutlet weak var logInButton: GeneralUIButton!
  • A button to skip sign in and account creation to test the tools.

    - Note: this does not allow the user to save their preferences.
    

    Declaration

    Swift

    @IBOutlet weak var demoToolsButton: GeneralUIButton!
  • An imageView that displays the company’s logo.

    Declaration

    Swift

    @IBOutlet weak var logoImageView: UIImageView!
  • A label to display the company’s name.

    Declaration

    Swift

    @IBOutlet weak var logoLabel: GeneralUILabel!
  • A label to ask the user if they would like to continue without signing in. This gets hidden if the user signs in.

    Declaration

    Swift

    @IBOutlet weak var toolsPromptLabel: GeneralUILabel!
  • A label to ask the user if they would like to log in. This gets hidden if the user signs in.

    Declaration

    Swift

    @IBOutlet weak var loginPrompt: GeneralUILabel!
  • Configure UIElements of the view. This sets the colors for the different buttons and the tint color for the ImageViews. Includes logic for if the user is signed in or not.

    Declaration

    Swift

    override func viewDidLoad()
  • Hides the navigation bar since it would look strange in the initial view with which the user is presented.

    Declaration

    Swift

    override func viewWillAppear(_ animated: Bool)
  • Reshow the navigation bar since it is an important part of other views.

    Declaration

    Swift

    override func viewWillDisappear(_ animated: Bool)
  • An action method for when the user attempts to logout. This makes changes within the APIManager that set the user to nil and change the rootViewController.

    Declaration

    Swift

    @IBAction func requestLogout(_ sender: Any)