Skip to content

Commit a2b6680

Browse files
committed
final changes
1 parent 1ea631e commit a2b6680

5 files changed

Lines changed: 42 additions & 40 deletions

File tree

AnimalsApp/AnimalsApp.xcodeproj/project.pbxproj

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
A458A09E28628B600057BC34 /* FavoritesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A458A09C28628B600057BC34 /* FavoritesViewController.swift */; };
2020
A458A09F28628B600057BC34 /* FavoritesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A458A09D28628B600057BC34 /* FavoritesViewController.xib */; };
2121
A458A0A0286351670057BC34 /* Pods_AnimalsApp.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D1DC7AE05F709A3F0E450DA /* Pods_AnimalsApp.framework */; };
22-
A458A0A1286351670057BC34 /* Pods_AnimalsApp.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9D1DC7AE05F709A3F0E450DA /* Pods_AnimalsApp.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2322
A463D0172858EBBB00929A3C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A463D0162858EBBB00929A3C /* AppDelegate.swift */; };
2423
A463D0212858EBBB00929A3C /* AnimalsApp.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = A463D01F2858EBBB00929A3C /* AnimalsApp.xcdatamodeld */; };
2524
A463D0232858EBBD00929A3C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A463D0222858EBBD00929A3C /* Assets.xcassets */; };
@@ -66,20 +65,6 @@
6665
};
6766
/* End PBXContainerItemProxy section */
6867

69-
/* Begin PBXCopyFilesBuildPhase section */
70-
A458A0A2286351670057BC34 /* Embed Frameworks */ = {
71-
isa = PBXCopyFilesBuildPhase;
72-
buildActionMask = 2147483647;
73-
dstPath = "";
74-
dstSubfolderSpec = 10;
75-
files = (
76-
A458A0A1286351670057BC34 /* Pods_AnimalsApp.framework in Embed Frameworks */,
77-
);
78-
name = "Embed Frameworks";
79-
runOnlyForDeploymentPostprocessing = 0;
80-
};
81-
/* End PBXCopyFilesBuildPhase section */
82-
8368
/* Begin PBXFileReference section */
8469
290D574622CE042567539136 /* Pods_AnimalsAppTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AnimalsAppTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8570
2DCF7719AB858998955D44F5 /* Pods-AnimalsApp-AnimalsAppUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AnimalsApp-AnimalsAppUITests.release.xcconfig"; path = "Target Support Files/Pods-AnimalsApp-AnimalsAppUITests/Pods-AnimalsApp-AnimalsAppUITests.release.xcconfig"; sourceTree = "<group>"; };
@@ -419,7 +404,6 @@
419404
A463D0102858EBBB00929A3C /* Frameworks */,
420405
A463D0112858EBBB00929A3C /* Resources */,
421406
E3DA1FD4397577CB97B30CF8 /* [CP] Embed Pods Frameworks */,
422-
A458A0A2286351670057BC34 /* Embed Frameworks */,
423407
);
424408
buildRules = (
425409
);

AnimalsApp/AnimalsApp/Views/FavoritesViewController/FavoritesViewController.swift

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ import UIKit
99

1010
class FavoritesViewController: UIViewController {
1111

12+
//MARK: Properties
1213
var favoritesVM: FavoritesViewModel?
1314

15+
//MARK: Outlets
1416
@IBOutlet weak var tableView: UITableView!
1517

18+
//MARK: Overrides
1619
override func viewDidLoad() {
1720
super.viewDidLoad()
18-
title = "Favoritos"
21+
setNavigationItems()
1922
favoritesVM = FavoritesViewModel()
2023

2124
setTableView()
@@ -30,6 +33,12 @@ class FavoritesViewController: UIViewController {
3033
}
3134
}
3235

36+
//MARK: Methods
37+
private func setNavigationItems() {
38+
title = "Favoritos"
39+
navigationItem.backButtonTitle = ""
40+
}
41+
3342
private func setTableView() {
3443
tableView.dataSource = self
3544
tableView.delegate = self
@@ -38,7 +47,7 @@ class FavoritesViewController: UIViewController {
3847
}
3948
}
4049

41-
// MARK: TableView Data Source
50+
// MARK: - TableView Data Source
4251
extension FavoritesViewController: UITableViewDataSource {
4352
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
4453
return favoritesVM?.numberOfRows() ?? 0
@@ -60,7 +69,7 @@ extension FavoritesViewController: UITableViewDataSource {
6069

6170
}
6271

63-
// MARK: TableView Delegate
72+
// MARK: - TableView Delegate
6473
extension FavoritesViewController: UITableViewDelegate {
6574

6675
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
@@ -76,7 +85,7 @@ extension FavoritesViewController: UITableViewDelegate {
7685

7786
}
7887

79-
// MARK: Action Delegate Protocol
88+
// MARK: - Action Delegate Protocol
8089
extension FavoritesViewController: ActionDelegateProtocol {
8190
func addFavoriteTapped(at index: Int, with image: Data) {
8291
}

AnimalsApp/AnimalsApp/Views/HomeViewController/HomeViewController.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ class HomeViewController: UIViewController {
2121
// MARK: Overrides
2222
override func viewDidLoad() {
2323
super.viewDidLoad()
24-
title = "Home"
2524
loadingView.startAnimating()
25+
setNavigationItems()
2626
setTableView()
2727

2828
homeVM.loadFavorites { [weak self] in
@@ -43,7 +43,12 @@ class HomeViewController: UIViewController {
4343
homeVM.saveChangesInCoreData()
4444
}
4545

46-
// MARK: Methods
46+
// MARK: Methods
47+
private func setNavigationItems() {
48+
title = "Home"
49+
navigationItem.backButtonTitle = ""
50+
}
51+
4752
private func setTableView() {
4853
tableView.dataSource = self
4954
tableView.delegate = self
@@ -53,6 +58,7 @@ class HomeViewController: UIViewController {
5358

5459
private func populateTableView() {
5560
emptyAnimationView.isHidden = true
61+
tableView.isHidden = false
5662
emptyAnimationView.stop()
5763

5864
homeVM.getAllAnimals { [weak self] (result) in

AnimalsApp/AnimalsApp/Views/TabBarController/MainTabBarController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class MainTabBarController: UITabBarController {
5959
navController.navigationBar.standardAppearance = appearance
6060
navController.navigationBar.scrollEdgeAppearance = navController.navigationBar.standardAppearance
6161

62-
// navigationItem.backButtonTitle = ""
62+
navController.navigationBar.tintColor = UIColor.blueTextColor
6363

6464
navController.navigationBar.layer.shadowOffset = CGSize(width: 0, height: 2)
6565
navController.navigationBar.layer.shadowRadius = 1

AnimalsApp/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 20 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)