Class
SignInVC
class SignInVC: UIViewController
Relationships
Conforms To
UIViewController
Properties
loginButton
let loginButton
signUpButton
let signUpButton
guestButton
let guestButton
emailTF
let emailTF
passwordTF
let passwordTF
backButton
let backButton
logoImage
let logoImage
errorMessageView
let errorMessageView
Methods
viewWillAppear(_:)
override func viewWillAppear(_ animated: Bool)
Adds a authentication listener to see if the user is signed in
keyboardWillShow(notification:)
@objc func keyboardWillShow(notification: NSNotification)
Raises the view when the keybaord appears
Parameters
Name | Type | Description |
---|---|---|
notification | NSNotification |
The notification observer that the keyboard has appeared |
keyboardWillHide(notification:)
@objc func keyboardWillHide(notification: NSNotification)
Lowers the view when the keyboard disappears
Parameters
Name | Type | Description |
---|---|---|
notification | NSNotification |
The notification observer that the keybaord has disappeard |
viewDidLoad()
override func viewDidLoad()
Main function of this view controller. All the important tasks are done here such as loading the UI, adding listener for the keyboard etc.
errorMessageViewSetup()
func errorMessageViewSetup()
Sets up the size/location/shape and style of the error message textview
logoImageSetup()
func logoImageSetup()
Sets up the size/location/shape and style of the logo image
loginButtonSetup()
func loginButtonSetup()
Sets up the size/location/shape and style of the login button
loginButtonTapped()
@objc func loginButtonTapped()
Action when the login button is tapped. Checks if all of the required fields are full and checks with firebase to authenticate
signUpButtonSetup()
func signUpButtonSetup()
Sets up the size/location/shape and style of the signup button
signUpButtonTapped()
@objc func signUpButtonTapped()
Action when the signup button is tapped. Registers the user in firebase
emailTFSetup()
func emailTFSetup()
Sets up the size/location/shape and style of the email textfield
passwordTFSetup()
func passwordTFSetup()
Sets up the size/location/shape and style of the password textfield
backButtonSetup()
func backButtonSetup()
Sets up the size/location/shape and style of the back button