Skip to content

Commit

Permalink
Fix translucent navigation bar on paywalls by making it fully transpa…
Browse files Browse the repository at this point in the history
…rent (on iOS 16+) (#4543)
  • Loading branch information
joshdholtz authored Dec 5, 2024
1 parent 9e60fd2 commit d48f44e
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions RevenueCatUI/PaywallView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,23 @@ struct LoadedOfferingPaywallView: View {

if self.displayCloseButton {
NavigationView {
view
.toolbar {
self.makeToolbar(
color: self.getCloseButtonColor(configuration: configuration)
)
}
// Prevents navigation bar from being showing as translucent
if #available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *) {
view
.toolbar {
self.makeToolbar(
color: self.getCloseButtonColor(configuration: configuration)
)
}
.toolbarBackground(.hidden, for: .navigationBar)
} else {
view
.toolbar {
self.makeToolbar(
color: self.getCloseButtonColor(configuration: configuration)
)
}
}
}
.navigationViewStyle(.stack)
} else {
Expand Down

0 comments on commit d48f44e

Please sign in to comment.