Skip to content

Commit ffcc180

Browse files
committed
change navigation bar ui
1 parent c5f4f7a commit ffcc180

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

AnimalsApp/AnimalsApp/Views/FavoritesViewController/FavoritesViewController.swift

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ class FavoritesViewController: UIViewController {
1212
override func viewDidLoad() {
1313
super.viewDidLoad()
1414

15-
view.backgroundColor = .blue
15+
setNavigationItems()
1616
}
1717

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.
18+
private func setNavigationItems() {
19+
title = "Favoritos"
20+
21+
let appearance = UINavigationBarAppearance()
22+
appearance.configureWithOpaqueBackground()
23+
appearance.titleTextAttributes = [
24+
NSAttributedString.Key.foregroundColor: UIColor.blueTextColor ?? UIColor.blue,
25+
NSAttributedString.Key.font: UIFont(name: "OpenSans", size: 20) ?? UIFont.systemFont(ofSize: 20)]
26+
navigationController?.navigationBar.standardAppearance = appearance
27+
navigationController?.navigationBar.scrollEdgeAppearance = navigationController?.navigationBar.standardAppearance
2628
}
27-
*/
2829

2930
}

0 commit comments

Comments
 (0)