SplashViewController
internal class SplashViewController: UIViewController
Displays a title and a login button to the user.
This is the first view controller that is presented to the user upon opening app.
-
A button that the user can tap to move on to the login screen.
Declaration
Swift
@IBOutlet internal weak var loginButton: UIButton!
-
An indicator to show the user that a network request is ongoing.
Declaration
Swift
@IBOutlet internal weak var activityIndicator: UIActivityIndicatorView!
-
A label displayed to inform the user that their login has failed.
Declaration
Swift
@IBOutlet internal weak var loginFailedLabel: UILabel!
-
Initiates the login process by performing a segue to a
LoginViewController
.Declaration
Swift
@IBAction internal func login(_ sender: UIButton)
Parameters
sender
The sender of the IBAction.
-
Unwind segue from
LoginViewController
.Declaration
Swift
@IBAction internal func unwindFromLogin(_ sender: UIStoryboardSegue)
Parameters
sender
The sender of the action.
-
Completion handler for when an authorisation code exchange has completed.
Declaration
Swift
internal func codeExchangeCompletion(_ result: DataService.AuthenticationResult?, _ error: DataService.Error?)
Parameters
result
The result of the exchange.
error
The error, if one occurred.
-
Segues to an instance of
LoginViewController
to initiate the login process.Declaration
Swift
private func initiateLogin()
-
Segues to the main view when the login process has completed successfully.
Declaration
Swift
private func segueToMainView()