Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Started applying navigation bar theme styles to iOS 13 and 14 too. #5715

Merged
merged 1 commit into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Riot/Managers/Theme/Themes/DarkTheme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,12 @@ class DarkTheme: NSObject, Theme {
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgesAppearance: false)
}

// 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.
func applyStyle(onNavigationBar navigationBar: UINavigationBar,
withModernScrollEdgesAppearance modernScrollEdgesAppearance: Bool) {
navigationBar.tintColor = tintColor

// On iOS 15 use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
if #available(iOS 15.0, *) {
if #available(iOS 13.0, *) {
let appearance = UINavigationBarAppearance()

appearance.configureWithOpaqueBackground()
Expand Down
3 changes: 1 addition & 2 deletions Riot/Managers/Theme/Themes/DefaultTheme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ class DefaultTheme: NSObject, Theme {
applyStyle(onNavigationBar: navigationBar, withModernScrollEdgesAppearance: false)
}

// 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.
func applyStyle(onNavigationBar navigationBar: UINavigationBar,
withModernScrollEdgesAppearance modernScrollEdgesAppearance: Bool) {
navigationBar.tintColor = tintColor

// On iOS 15 use UINavigationBarAppearance to fix visual issues with the scrollEdgeAppearance style.
if #available(iOS 15.0, *) {
if #available(iOS 13.0, *) {
let appearance = UINavigationBarAppearance()

appearance.configureWithOpaqueBackground()
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-5715.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Started applying navigation bar theme styles to iOS 13 and 14 too.