2323import UIKit
2424
2525public extension UINavigationBar {
26-
26+
2727 /**
2828 SparrowKit: Change font of title.
2929
@@ -56,7 +56,7 @@ public extension UINavigationBar {
5656 tintColor = textColor
5757 titleTextAttributes = [ . foregroundColor: textColor]
5858 }
59-
59+
6060 /**
6161 SparrowKit: Make transparent of background of navigation.
6262 */
@@ -82,16 +82,22 @@ public extension UINavigationBar {
8282 }
8383
8484 @available ( iOS 13 . 0 , * )
85- func setAppearance( _ value: NavigationBarAppearance ) {
85+ /**
86+ SparrowKit: Set appearance for navigation bar.
87+ */
88+ func setAppearance( _ value: SPNavigationBarAppearance ) {
8689 self . standardAppearance = value. standardAppearance
8790 self . scrollEdgeAppearance = value. scrollEdgeAppearance
8891 }
8992
9093 @available ( iOS 13 . 0 , * )
91- enum NavigationBarAppearance {
94+ /**
95+ SparrowKit: Appearance cases.
96+ */
97+ enum SPNavigationBarAppearance {
9298
9399 case transparentAlways
94- case transparentStandardOpaqueScroll
100+ case transparentStandardOnly
95101 case opaqueAlways
96102
97103 var standardAppearance : UINavigationBarAppearance {
@@ -100,13 +106,13 @@ public extension UINavigationBar {
100106 let appearance = UINavigationBarAppearance ( )
101107 appearance. configureWithTransparentBackground ( )
102108 return appearance
103- case . transparentStandardOpaqueScroll :
109+ case . transparentStandardOnly :
104110 let appearance = UINavigationBarAppearance ( )
105111 appearance. configureWithTransparentBackground ( )
106112 return appearance
107113 case . opaqueAlways:
108114 let appearance = UINavigationBarAppearance ( )
109- appearance. configureWithOpaqueBackground ( )
115+ appearance. configureWithDefaultBackground ( )
110116 return appearance
111117 }
112118 }
@@ -117,13 +123,13 @@ public extension UINavigationBar {
117123 let appearance = UINavigationBarAppearance ( )
118124 appearance. configureWithTransparentBackground ( )
119125 return appearance
120- case . transparentStandardOpaqueScroll :
126+ case . transparentStandardOnly :
121127 let appearance = UINavigationBarAppearance ( )
122- appearance. configureWithTransparentBackground ( )
128+ appearance. configureWithDefaultBackground ( )
123129 return appearance
124130 case . opaqueAlways:
125131 let appearance = UINavigationBarAppearance ( )
126- appearance. configureWithOpaqueBackground ( )
132+ appearance. configureWithDefaultBackground ( )
127133 return appearance
128134 }
129135 }
0 commit comments