Skip to content

Commit 169a284

Browse files
committed
Adicionada a tela de cadastro e uma parte do código
1 parent e13ff7c commit 169a284

2 files changed

Lines changed: 206 additions & 23 deletions

File tree

AnimalsApp/AnimalsApp/Views/RegisterViewController/RegisterViewController.swift

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,44 @@
88
import UIKit
99

1010
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
1222
override func viewDidLoad() {
1323
super.viewDidLoad()
14-
15-
view.backgroundColor = .green
24+
setupUI()
25+
setNavigationItens()
1626
}
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
2650
}
27-
*/
28-
2951
}

0 commit comments

Comments
 (0)