|
8 | 8 | import UIKit |
9 | 9 |
|
10 | 10 | class RegisterViewController: UIViewController { |
11 | | - |
| 11 | + // MARK: Properties |
| 12 | + |
| 13 | + // MARK: Outlets |
| 14 | + @IBOutlet weak var textFieldName: UITextField! |
| 15 | + @IBOutlet weak var textFieldImageLink: UITextField! |
| 16 | + @IBOutlet weak var textFieldDescription: UITextField! |
| 17 | + @IBOutlet weak var textFieldSpecie: UITextField! |
| 18 | + @IBOutlet weak var textFieldAge: UITextField! |
| 19 | + @IBOutlet weak var buttonRegister: UIButton! |
| 20 | + |
| 21 | + // MARK: Overrides |
12 | 22 | override func viewDidLoad() { |
13 | 23 | super.viewDidLoad() |
14 | | - |
15 | | - view.backgroundColor = .green |
| 24 | + setupUI() |
| 25 | + setNavigationItens() |
16 | 26 | } |
17 | | - |
18 | | - |
19 | | - /* |
20 | | - // MARK: - Navigation |
21 | | - |
22 | | - // In a storyboard-based application, you will often want to do a little preparation before navigation |
23 | | - override func prepare(for segue: UIStoryboardSegue, sender: Any?) { |
24 | | - // Get the new view controller using segue.destination. |
25 | | - // Pass the selected object to the new view controller. |
| 27 | + |
| 28 | + override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { |
| 29 | + self.view.endEditing(true) |
| 30 | + } |
| 31 | + |
| 32 | + // MARK: Actions |
| 33 | + @IBAction func handlerButtonRegister(_ sender: Any) { |
| 34 | + |
| 35 | + } |
| 36 | + |
| 37 | + // MARK: Methods |
| 38 | + private func setNavigationItens() { |
| 39 | + title = "Cadastrar" |
| 40 | + navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor(named: "blueTabBarColor") ?? ""] |
| 41 | + } |
| 42 | + |
| 43 | + private func setupUI() { |
| 44 | + textFieldName.layer.cornerRadius = 10 |
| 45 | + textFieldImageLink.layer.cornerRadius = 10 |
| 46 | + textFieldDescription.layer.cornerRadius = 10 |
| 47 | + textFieldSpecie.layer.cornerRadius = 10 |
| 48 | + textFieldAge.layer.cornerRadius = 10 |
| 49 | + buttonRegister.layer.cornerRadius = 10 |
26 | 50 | } |
27 | | - */ |
28 | | - |
29 | 51 | } |
0 commit comments