File tree Expand file tree Collapse file tree
AnimalsApp/AnimalsApp/Views/FavoritesViewController Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments