SettingsViewController - Ben-Stacey/COSC345 GitHub Wiki

SettingsViewController

View Controller for Settings

class SettingsViewController: UIViewController 

Inheritance

UIViewController

Properties

nameField

@IBOutlet weak var nameField: UITextField!

langPicked

@IBOutlet weak var langPicked: UILabel!

submitButton

@IBOutlet weak var submitButton: UIButton!

backButton

@IBOutlet weak var backButton: UIButton!

Methods

viewDidLoad()

Loads the View Controller

override func viewDidLoad() 

maoriButton(_:)

When the maori button is clicked it stores the language and displays it on the screen

@IBAction func maoriButton(_ sender: Any) 

Parameters

  • any: [in] allows method to be sent anything

spanishButton(_:)

When the spanish button is clicked it stores the language and displays it on the screen

@IBAction func spanishButton(_ sender: Any) 

Parameters

  • any: [in] allows method to be sent anything

frenchButton(_:)

When the french button is clicked it stores the language and displays it on the screen

@IBAction func frenchButton(_ sender: Any) 

Parameters

  • any: [in] allows method to be sent anything

submitButton(_:)

When the submit button is clicked it stores the name in the textfield and goes to the next screen

@IBAction func submitButton(_ sender: Any) 

Parameters

  • any: [in] allows method to be sent anything

backButtton(_:)

When the back button is clicked it goes to the previous screen

@IBAction func backButtton(_ sender: Any) 

Parameters

  • any: [in] allows method to be sent anything