Skip to content

Commit 559165c

Browse files
author
Pedro Alvarez
authored
Merge pull request #73 from RickyMarq/develop/feature_tabBar
TabBar Desenvolvida 🛠
2 parents 22ed984 + 054832c commit 559165c

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

solutions/devsprint-pedro-alvarez-2/FinanceApp.xcodeproj/project.pbxproj

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
1DBC0432294176F6000501FA /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DBC0431294176F6000501FA /* TabBarController.swift */; };
1011
98584A6D277E32C30028DBEA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98584A6C277E32C30028DBEA /* AppDelegate.swift */; };
1112
98584A6F277E32C30028DBEA /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98584A6E277E32C30028DBEA /* SceneDelegate.swift */; };
1213
98584A76277E32C50028DBEA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 98584A75277E32C50028DBEA /* Assets.xcassets */; };
@@ -70,6 +71,7 @@
7071
/* End PBXContainerItemProxy section */
7172

7273
/* Begin PBXFileReference section */
74+
1DBC0431294176F6000501FA /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; };
7375
98584A69277E32C30028DBEA /* FinanceApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FinanceApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
7476
98584A6C277E32C30028DBEA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7577
98584A6E277E32C30028DBEA /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -144,6 +146,14 @@
144146
/* End PBXFrameworksBuildPhase section */
145147

146148
/* Begin PBXGroup section */
149+
1DBC043029417602000501FA /* TabBar */ = {
150+
isa = PBXGroup;
151+
children = (
152+
1DBC0431294176F6000501FA /* TabBarController.swift */,
153+
);
154+
path = TabBar;
155+
sourceTree = "<group>";
156+
};
147157
98584A60277E32C30028DBEA = {
148158
isa = PBXGroup;
149159
children = (
@@ -167,6 +177,7 @@
167177
98584A6B277E32C30028DBEA /* FinanceApp */ = {
168178
isa = PBXGroup;
169179
children = (
180+
1DBC043029417602000501FA /* TabBar */,
170181
98584A9D277E351B0028DBEA /* Resources */,
171182
98584A9C277E350D0028DBEA /* AppDelegate */,
172183
98584A9E277E35700028DBEA /* Screens */,
@@ -494,6 +505,7 @@
494505
98906BF02939223C001D1975 /* ActivityCellView.swift in Sources */,
495506
98584AA7277E35F10028DBEA /* HomeView.swift in Sources */,
496507
98584B1F277E60740028DBEA /* ContactListView.swift in Sources */,
508+
1DBC0432294176F6000501FA /* TabBarController.swift in Sources */,
497509
989627E027ADC2F60009A07F /* DebugViewController.swift in Sources */,
498510
98584AA5277E35E90028DBEA /* HomeViewController.swift in Sources */,
499511
98906BF229392248001D1975 /* ActivityListView.swift in Sources */,
@@ -679,7 +691,7 @@
679691
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
680692
CODE_SIGN_STYLE = Automatic;
681693
CURRENT_PROJECT_VERSION = 1;
682-
DEVELOPMENT_TEAM = B8F644M47X;
694+
DEVELOPMENT_TEAM = LHWFX4B5B6;
683695
GENERATE_INFOPLIST_FILE = YES;
684696
INFOPLIST_FILE = FinanceApp/Resources/Info.plist;
685697
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
@@ -707,7 +719,7 @@
707719
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
708720
CODE_SIGN_STYLE = Automatic;
709721
CURRENT_PROJECT_VERSION = 1;
710-
DEVELOPMENT_TEAM = B8F644M47X;
722+
DEVELOPMENT_TEAM = LHWFX4B5B6;
711723
GENERATE_INFOPLIST_FILE = YES;
712724
INFOPLIST_FILE = FinanceApp/Resources/Info.plist;
713725
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;

solutions/devsprint-pedro-alvarez-2/FinanceApp/AppDelegate/SceneDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
1717
guard let windowScene = (scene as? UIWindowScene) else { return }
1818

1919
self.window = UIWindow(frame: UIScreen.main.bounds)
20-
self.window?.rootViewController = UINavigationController(rootViewController: HomeViewController())
20+
self.window?.rootViewController = TabBarController()
2121
self.window?.windowScene = windowScene
2222
self.window?.makeKeyAndVisible()
2323
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// TabBarController.swift
3+
// FinanceApp
4+
//
5+
// Created by Henrique Marques on 07/12/22.
6+
//
7+
8+
import UIKit
9+
10+
class TabBarController: UITabBarController {
11+
12+
override func viewDidLoad() {
13+
super.viewDidLoad()
14+
self.initTabBar()
15+
}
16+
17+
func initTabBar() {
18+
let screen01 = UINavigationController(rootViewController: HomeViewController())
19+
let screen02 = UINavigationController(rootViewController: TransfersViewController())
20+
21+
self.setViewControllers([screen01, screen02], animated: true)
22+
23+
guard let items = tabBar.items else {return}
24+
25+
items[0].title = "Home"
26+
items[0].image = UIImage(named: "house.fill")
27+
items[1].title = "Transfers"
28+
items[1].image = UIImage(named: "arrow.up.arrow.down")
29+
}
30+
31+
}

0 commit comments

Comments
 (0)