@@ -2,43 +2,43 @@ import SwiftUI
2
2
3
3
@main
4
4
final class AppDelegate : UIResponder , UIApplicationDelegate {
5
- #if !os(tvOS)
6
- func applicationDidFinishLaunching( _ application: UIApplication ) {
7
- customizeNavigationBarAppearance ( )
8
- customizeTabBarAppearance ( )
9
- }
10
-
11
- // https://developer.apple.com/documentation/technotes/tn3106-customizing-uinavigationbar-appearance
12
- func customizeNavigationBarAppearance( ) {
13
- let customAppearance = UINavigationBarAppearance ( )
14
-
15
- customAppearance. configureWithOpaqueBackground ( )
16
- customAppearance. backgroundColor = . systemBackground
17
-
18
- let proxy = UINavigationBar . appearance ( )
19
- proxy. scrollEdgeAppearance = customAppearance
20
- proxy. compactAppearance = customAppearance
21
- proxy. standardAppearance = customAppearance
22
- if #available( iOS 15 . 0 , tvOS 15 , * ) {
23
- proxy. compactScrollEdgeAppearance = customAppearance
24
- }
25
- }
26
-
27
- func customizeTabBarAppearance( ) {
28
- let customAppearance = UITabBarAppearance ( )
29
-
30
- customAppearance. configureWithOpaqueBackground ( )
31
- customAppearance. backgroundColor = . systemBackground
32
-
33
- let proxy = UITabBar . appearance ( )
34
- proxy. standardAppearance = customAppearance
35
- if #available( iOS 15 , tvOS 15 , * ) {
36
- proxy. scrollEdgeAppearance = customAppearance
37
- }
38
- }
39
- #endif
40
-
41
- func application( _ application: UIApplication , configurationForConnecting connectingSceneSession: UISceneSession , options: UIScene . ConnectionOptions ) -> UISceneConfiguration {
42
- UISceneConfiguration ( name: " Default Configuration " , sessionRole: connectingSceneSession. role)
43
- }
5
+ #if !os(tvOS)
6
+ func applicationDidFinishLaunching( _ application: UIApplication ) {
7
+ customizeNavigationBarAppearance ( )
8
+ customizeTabBarAppearance ( )
9
+ }
10
+
11
+ // https://developer.apple.com/documentation/technotes/tn3106-customizing-uinavigationbar-appearance
12
+ func customizeNavigationBarAppearance( ) {
13
+ let customAppearance = UINavigationBarAppearance ( )
14
+
15
+ customAppearance. configureWithOpaqueBackground ( )
16
+ customAppearance. backgroundColor = . systemBackground
17
+
18
+ let proxy = UINavigationBar . appearance ( )
19
+ proxy. scrollEdgeAppearance = customAppearance
20
+ proxy. compactAppearance = customAppearance
21
+ proxy. standardAppearance = customAppearance
22
+ if #available( iOS 15 . 0 , tvOS 15 , * ) {
23
+ proxy. compactScrollEdgeAppearance = customAppearance
24
+ }
25
+ }
26
+
27
+ func customizeTabBarAppearance( ) {
28
+ let customAppearance = UITabBarAppearance ( )
29
+
30
+ customAppearance. configureWithOpaqueBackground ( )
31
+ customAppearance. backgroundColor = . systemBackground
32
+
33
+ let proxy = UITabBar . appearance ( )
34
+ proxy. standardAppearance = customAppearance
35
+ if #available( iOS 15 , tvOS 15 , * ) {
36
+ proxy. scrollEdgeAppearance = customAppearance
37
+ }
38
+ }
39
+ #endif
40
+
41
+ func application( _ application: UIApplication , configurationForConnecting connectingSceneSession: UISceneSession , options: UIScene . ConnectionOptions ) -> UISceneConfiguration {
42
+ UISceneConfiguration ( name: " Default Configuration " , sessionRole: connectingSceneSession. role)
43
+ }
44
44
}
0 commit comments