Make scrollEdgesAppearance singular to match UIKit

This commit is contained in:
Doug
2022-03-16 08:54:36 +00:00
parent d02ef62cd4
commit cc6afc5f75
8 changed files with 17 additions and 16 deletions
@@ -120,11 +120,11 @@ class DefaultTheme: NSObject, Theme {
// Protocols don't support default parameter values and a protocol extension doesn't work for @objc
func applyStyle(onNavigationBar navigationBar: UINavigationBar) {
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgesAppearance: false)
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgeAppearance: false)
}
func applyStyle(onNavigationBar navigationBar: UINavigationBar,
withModernScrollEdgesAppearance modernScrollEdgesAppearance: Bool) {
withModernScrollEdgeAppearance modernScrollEdgeAppearance: Bool) {
navigationBar.tintColor = tintColor
// On iOS 15 use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
@@ -133,7 +133,7 @@ class DefaultTheme: NSObject, Theme {
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = baseColor
if !modernScrollEdgesAppearance {
if !modernScrollEdgeAppearance {
appearance.shadowColor = nil
}
appearance.titleTextAttributes = [
@@ -141,7 +141,7 @@ class DefaultTheme: NSObject, Theme {
]
navigationBar.standardAppearance = appearance
navigationBar.scrollEdgeAppearance = modernScrollEdgesAppearance ? nil : appearance
navigationBar.scrollEdgeAppearance = modernScrollEdgeAppearance ? nil : appearance
} else {
navigationBar.titleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimaryColor