Skip to content

Commit 0b2902e

Browse files
committed
Started applying navigation bar theme styles to iOS 13 and 14 too.
1 parent 7649bec commit 0b2902e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Riot/Managers/Theme/Themes/DarkTheme.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,12 @@ class DarkTheme: NSObject, Theme {
117117
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgesAppearance: false)
118118
}
119119

120-
// Note: We are not using UINavigationBarAppearance on iOS 13/14 because of UINavigationBar directly including UISearchBar on their titleView that cause crop issues with UINavigationController pop.
121120
func applyStyle(onNavigationBar navigationBar: UINavigationBar,
122121
withModernScrollEdgesAppearance modernScrollEdgesAppearance: Bool) {
123122
navigationBar.tintColor = tintColor
124123

125-
// On iOS 15 use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
126-
if #available(iOS 15.0, *) {
124+
// On iOS 13+ use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
125+
if #available(iOS 13.0, *) {
127126
let appearance = UINavigationBarAppearance()
128127

129128
appearance.configureWithOpaqueBackground()

Riot/Managers/Theme/Themes/DefaultTheme.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,12 @@ class DefaultTheme: NSObject, Theme {
123123
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgesAppearance: false)
124124
}
125125

126-
// Note: We are not using UINavigationBarAppearance on iOS 13/14 because of UINavigationBar directly including UISearchBar on their titleView that cause crop issues with UINavigationController pop.
127126
func applyStyle(onNavigationBar navigationBar: UINavigationBar,
128127
withModernScrollEdgesAppearance modernScrollEdgesAppearance: Bool) {
129128
navigationBar.tintColor = tintColor
130129

131-
// On iOS 15 use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
132-
if #available(iOS 15.0, *) {
130+
// On iOS 13+ use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
131+
if #available(iOS 13.0, *) {
133132
let appearance = UINavigationBarAppearance()
134133

135134
appearance.configureWithOpaqueBackground()

changelog.d/pr-5715.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Started applying navigation bar theme styles to iOS 13 and 14 too.

0 commit comments

Comments
 (0)