SmartPrompter Documentation Beta

Class Sign​InVC

class SignInVC: UIViewController
%3 SignInVC SignInVC UIViewController UIViewController SignInVC->UIViewController

Conforms To

UIViewController

Properties

login​Button

let loginButton

sign​UpButton

let signUpButton

guest​Button

let guestButton

email​TF

let emailTF

password​TF

let passwordTF

back​Button

let backButton

logo​Image

let logoImage

error​Message​View

let errorMessageView

Methods

view​Will​Appear(_:​)

override func viewWillAppear(_ animated: Bool)

Adds a authentication listener to see if the user is signed in

keyboard​Will​Show(notification:​)

@objc func keyboardWillShow(notification: NSNotification)

Raises the view when the keybaord appears

Parameters

notification NSNotification

The notification observer that the keyboard has appeared

keyboard​Will​Hide(notification:​)

@objc func keyboardWillHide(notification: NSNotification)

Lowers the view when the keyboard disappears

Parameters

notification NSNotification

The notification observer that the keybaord has disappeard

view​Did​Load()

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.

error​Message​View​Setup()

func errorMessageViewSetup()

Sets up the size/location/shape and style of the error message textview

logo​Image​Setup()

func logoImageSetup()

Sets up the size/location/shape and style of the logo image

login​Button​Setup()

func loginButtonSetup()

Sets up the size/location/shape and style of the login button

login​Button​Tapped()

@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

sign​UpButton​Setup()

func signUpButtonSetup()

Sets up the size/location/shape and style of the signup button

sign​UpButton​Tapped()

@objc func signUpButtonTapped()

Action when the signup button is tapped. Registers the user in firebase

email​TFSetup()

func emailTFSetup()

Sets up the size/location/shape and style of the email textfield

password​TFSetup()

func passwordTFSetup()

Sets up the size/location/shape and style of the password textfield

back​Button​Setup()

func backButtonSetup()

Sets up the size/location/shape and style of the back button